Class BSONObject
Inheritance
System.Object
BSONObject
Implements
System.Collections.Generic.IEnumerable<
System.Collections.Generic.KeyValuePair<
System.String,
BSONValue>>
System.Collections.IEnumerable
Assembly: Eco.Shared.dll
Syntax
[BsonManualSerialize]
public class BSONObject : BSONValue<BSONObject>, IEquatable<BSONValue>, IEnumerable<KeyValuePair<string, BSONValue>>, IEnumerable
Properties
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Item[String]
Declaration
public BSONValue this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
New
Declaration
public static BSONObject New { get; }
Property Value
NewView
Declaration
public static BSONObject NewView { get; }
Property Value
NewViewUpdate
Declaration
public static BSONObject NewViewUpdate { get; }
Property Value
ObjectValue
Declaration
public override BSONObject ObjectValue { get; }
Property Value
Overrides
ViewID
Declaration
public override int ViewID { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Methods
Add(String, BSONValue)
Declaration
public void Add(string key, BSONValue value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
BSONValue |
value |
|
ContainsKey(String)
Declaration
public bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Encode(MemoryStream)
Declaration
public void Encode(MemoryStream stream)
Parameters
Type |
Name |
Description |
System.IO.MemoryStream |
stream |
|
GetEnumerator()
Declaration
public Dictionary<string, BSONValue>.Enumerator GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.Dictionary.Enumerator<> |
|
GetOrDefault(String)
Declaration
public BSONValue GetOrDefault(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
IncrementRef()
Declaration
public void IncrementRef()
ToStringIndented(Int32, HashSet<BSONValue>)
Declaration
protected override string ToStringIndented(int indentLevel, HashSet<BSONValue> visited)
Parameters
Type |
Name |
Description |
System.Int32 |
indentLevel |
|
System.Collections.Generic.HashSet<BSONValue> |
visited |
|
Returns
Type |
Description |
System.String |
|
Overrides
TryGetArrayValue(String, out BSONArray)
Returns value for key
converted to BSONArray.
Declaration
public bool TryGetArrayValue(string key, out BSONArray value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
BSONArray |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetArrayValueAsList<T>(String, out List<T>)
Returns value for key
converted to System.Collections.Generic.List<>.
Declaration
public bool TryGetArrayValueAsList<T>(string key, out List<T> value)
where T : IBsonDeserializable, new()
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.Generic.List<T> |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
TryGetBoolValue(String, out Boolean)
Returns value for key
converted to System.Boolean.
Declaration
public bool TryGetBoolValue(string key, out bool value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Boolean |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetDoubleValue(String, out Double)
Returns value for key
converted to System.Double.
Declaration
public bool TryGetDoubleValue(string key, out double value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Double |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetFloatValue(String, out Single)
Returns value for key
converted to System.Single.
Declaration
public bool TryGetFloatValue(string key, out float value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Single |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetGuidValue(String, out Guid)
Returns value for key
converted to System.Guid.
Declaration
public bool TryGetGuidValue(string key, out Guid value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Guid |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetInt32ArrayValueAsList(String, out List<Int32>)
Returns value for key
converted to System.Collections.Generic.List<>.
Declaration
public bool TryGetInt32ArrayValueAsList(string key, out List<int> value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.Generic.List<System.Int32> |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetInt32Value(String, out Int32)
Returns value for key
converted to System.Int32.
Declaration
public bool TryGetInt32Value(string key, out int value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int32 |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetInt64Value(String, out Int64)
Returns value for key
converted to System.Int64.
Declaration
public bool TryGetInt64Value(string key, out long value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int64 |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetLocStringValue(String, out LocString)
Returns value for key
converted to LocString.
Declaration
public bool TryGetLocStringValue(string key, out LocString value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
LocString |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetStringValue(String, out String)
Returns value for key
converted to System.String.
Declaration
public bool TryGetStringValue(string key, out string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryGetValue(String, out BSONValue)
Declaration
public bool TryGetValue(string key, out BSONValue value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
BSONValue |
value |
|
Returns
Type |
Description |
System.Boolean |
|
TryIncrementRef()
Every time when you create a ref for shared BSONObject you have to increment ref.
In this case it will be recycled only when last ref will be recycled.
Declaration
public bool TryIncrementRef()
Returns
Type |
Description |
System.Boolean |
true if ref was increased, false if ref can't be increased because of all existing refs was already recycled and this object is invalid.
|
Declaration
protected override bool TryPerformRecycle()
Returns
Type |
Description |
System.Boolean |
|
Overrides
Eco.Shared.Serialization.BSONValue<Eco.Shared.Serialization.BSONObject>.TryPerformRecycle()
Implements
System.IEquatable<>
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
Extension Methods