Class LazyBsonArray
Represents a BSON array that is deserialized lazily.
[BsonSerializer(typeof(LazyBsonArraySerializer))]
public class LazyBsonArray : MaterializedOnDemandBsonArray, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonArray>, IEquatable<BsonArray>, IList<BsonValue>, ICollection<BsonValue>, IEnumerable<BsonValue>, IEnumerable, IDisposable
- Inheritance
-
LazyBsonArray
- Implements
- Inherited Members
- Extension Methods
Constructors
LazyBsonArray(IByteBuffer)
Initializes a new instance of the LazyBsonArray class.
public LazyBsonArray(IByteBuffer slice)
Parameters
slice
IByteBufferThe slice.
Exceptions
- ArgumentNullException
slice
- ArgumentException
LazyBsonArray cannot be used with an IByteBuffer that needs disposing.
Properties
Slice
Gets the slice.
public IByteBuffer Slice { get; }
Property Value
- IByteBuffer
The slice.
Methods
Clone()
Creates a shallow clone of the array (see also DeepClone).
public override BsonValue Clone()
Returns
- BsonValue
A shallow clone of the array.
DeepClone()
Creates a deep clone of the array (see also Clone).
public override BsonValue DeepClone()
Returns
- BsonValue
A deep clone of the array.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue
to release both managed and unmanaged resources;false
to release only unmanaged resources.
Materialize()
Materializes the BsonArray.
protected override IEnumerable<BsonValue> Materialize()
Returns
- IEnumerable<BsonValue>
The materialized values.
MaterializeCompleted()
Informs subclasses that the Materialize process completed so they can free any resources related to the unmaterialized state.
protected override void MaterializeCompleted()