Table of Contents

Class LazyBsonDocument

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

Represents a BSON document that is deserialized lazily.

[BsonSerializer(typeof(LazyBsonDocumentSerializer))]
public class LazyBsonDocument : MaterializedOnDemandBsonDocument, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonDocument>, IConvertibleToBsonDocument, IEnumerable<BsonElement>, IEnumerable, IEquatable<BsonDocument>, IDisposable
Inheritance
LazyBsonDocument
Implements
Inherited Members
Extension Methods

Constructors

LazyBsonDocument(IByteBuffer)

Initializes a new instance of the LazyBsonDocument class.

public LazyBsonDocument(IByteBuffer slice)

Parameters

slice IByteBuffer

The slice.

Exceptions

ArgumentNullException

slice

ArgumentException

LazyBsonDocument cannot be used with an IByteBuffer that needs disposing.

LazyBsonDocument(byte[])

Initializes a new instance of the LazyBsonDocument class.

public LazyBsonDocument(byte[] bytes)

Parameters

bytes byte[]

The bytes.

Properties

Slice

Gets the slice.

public IByteBuffer Slice { get; }

Property Value

IByteBuffer

The slice.

Methods

Clone()

Creates a shallow clone of the document (see also DeepClone).

public override BsonValue Clone()

Returns

BsonValue

A shallow clone of the document.

DeepClone()

Creates a deep clone of the document (see also Clone).

public override BsonValue DeepClone()

Returns

BsonValue

A deep clone of the document.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Materialize()

Materializes the BsonDocument.

protected override IEnumerable<BsonElement> Materialize()

Returns

IEnumerable<BsonElement>

The materialized elements.

MaterializeCompleted()

Informs subclasses that the Materialize process completed so they can free any resources related to the unmaterialized state.

protected override void MaterializeCompleted()