Show / Hide Table of Contents

Class BSONCachedValue

BSONCachedValue may be used to cache any other BSONValue and to be used in place of it. Cached BSONValue will be pre-serialized to byte array and helps to save serialization time. When decoded it will be deserialized as a cached BSONValue. There no need for additional handling on receiving side.

Inheritance
System.Object
BSONValue
BSONCachedValue
Implements
System.IEquatable<BSONValue>
Inherited Members
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.ToStringIndented(Int32, HashSet<BSONValue>)
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.ObjectValue
BSONValue.LocStringValue
BSONValue.ViewID
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
public class BSONCachedValue : BSONValue, IEquatable<BSONValue>

Methods

Cache(BSONValue)

Encodes value to binary form and saves it to Eco.Shared.Serialization.BSONCachedValue.CachedBytes. Returned BSONCachedValue can't be modified. Cached value will be recycled!

Declaration
public static BSONCachedValue Cache(BSONValue value)
Parameters
Type Name Description
BSONValue value
Returns
Type Description
BSONCachedValue

Recycle()

Recycle does nothing, because usually cached value shared between multiple BSON objects.

Declaration
public override void Recycle()
Overrides
BSONValue.Recycle()

Implements

System.IEquatable<>

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
☀
☾