Show / Hide Table of Contents

Class BSONObject

Inheritance
System.Object
BSONValue
BSONValue<BSONObject>
BSONObject
Implements
System.IEquatable<BSONValue>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, BSONValue>>
System.Collections.IEnumerable
Inherited Members
BSONValue<BSONObject>.Recycle()
BSONValue<BSONObject>.ThrowMultipleRecycleError()
BSONValue.ListValue<T>()
BSONValue.NewBSONValue(BSONValueType)
BSONValue.NewViewRef(Int32)
BSONValue.NewBlobRef(Int32)
BSONValue.NewCachedDataRef(String)
BSONValue.NewTypeId(Int32)
BSONValue.NewBSONValue(Double)
BSONValue.NewBSONValue(Single)
BSONValue.NewBSONValue(Color)
BSONValue.NewBSONValue(Vector3)
BSONValue.NewBSONValue(Vector2)
BSONValue.NewBSONValue(Vector3i)
BSONValue.NewBSONValue(Vector2i)
BSONValue.NewBSONValue(Quaternion)
BSONValue.NewBSONValue(Guid)
BSONValue.NewBSONValue(LocString)
BSONValue.NewBSONValue(String)
BSONValue.NewBSONValue(Byte[], Boolean, Boolean)
BSONValue.NewBSONValue(UInt16[])
BSONValue.NewBsonValue(Int32[])
BSONValue.NewBsonValue(ICollection<UInt16>)
BSONValue.NewBsonValue(ICollection<Int32>)
BSONValue.NewBSONValue(Boolean)
BSONValue.NewBSONValue(DateTime)
BSONValue.NewBSONValue(Int32)
BSONValue.NewBSONValue(Int64)
BSONValue.NewBSONValue(UInt64)
BSONValue.NewBSONValue(Byte)
BSONValue.Cast<T>()
BSONValue.Equals(BSONValue)
BSONValue.ToString()
BSONValue.DebugToString()
BSONValue.ValueType
BSONValue.DoubleValue
BSONValue.FloatValue
BSONValue.Vector3Value
BSONValue.Vector2Value
BSONValue.Vector3iValue
BSONValue.Vector2iValue
BSONValue.Vector3iValueNullable
BSONValue.QuaternionValue
BSONValue.StringValue
BSONValue.BoolValue
BSONValue.DateTimeValue
BSONValue.ByteValue
BSONValue.Int32Value
BSONValue.Int64Value
BSONValue.UInt64Value
BSONValue.GuidValue
BSONValue.ColorValue
BSONValue.ArrayValue
BSONValue.LocStringValue
BSONValue.BlobID
BSONValue.ViewTypeID
BSONValue.IsNull
BSONValue.BinaryValue
BSONValue.ByteSpanValue
BSONValue.UShortArrayValue
BSONValue.UShortSpanValue
BSONValue.IntArrayValue
BSONValue.IntSpanValue
Namespace: Eco.Shared.Serialization
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
Type Description
BSONValue

New

Declaration
public static BSONObject New { get; }
Property Value
Type Description
BSONObject

NewView

Declaration
public static BSONObject NewView { get; }
Property Value
Type Description
BSONObject

NewViewUpdate

Declaration
public static BSONObject NewViewUpdate { get; }
Property Value
Type Description
BSONObject

ObjectValue

Declaration
public override BSONObject ObjectValue { get; }
Property Value
Type Description
BSONObject
Overrides
BSONValue.ObjectValue

ViewID

Declaration
public override int ViewID { get; }
Property Value
Type Description
System.Int32
Overrides
BSONValue.ViewID

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
Type Description
BSONValue

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
BSONValue.ToStringIndented(Int32, HashSet<BSONValue>)

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
Name Description
T

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.

TryPerformRecycle()

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

BsonValueBackgroundRecycler.RecycleInBackground(BSONValue)
SimpleBSON.WithStatsRecording(BSONValue)
CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
ViewManager.UnpackageView<T>(BSONValue)
ViewManager.UnpackageView(BSONValue)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾