Class SharedBSONObject
Use this object if you have to share bson object. I.e. Player.animationData stored as shared object and then delivered to all clients. It keeps tracking of all object references and only recycle object when all references recycled.
Inheritance
System.Object
SharedBSONObject
Implements
System.IDisposable
Namespace: Eco.Shared.Serialization
Assembly: Eco.Shared.dll
Syntax
public sealed class SharedBSONObject : Object, IDisposable
Constructors
SharedBSONObject()
Declaration
public SharedBSONObject()
Methods
Dispose()
Declaration
public void Dispose()
StartSharing(BSONObject, Boolean)
Declaration
public void StartSharing(BSONObject value, bool addRef)
Parameters
Type | Name | Description |
---|---|---|
BSONObject | value | |
System.Boolean | addRef |
StopSharing()
Declaration
public void StopSharing()
TryGetRef(out BSONObject)
Declaration
public bool TryGetRef(out BSONObject value)
Parameters
Type | Name | Description |
---|---|---|
BSONObject | value |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IDisposable