Class BsonDocumentWriter
Represents a BSON writer to a BsonDocument.
public class BsonDocumentWriter : BsonWriter, IBsonWriter, IDisposable
- Inheritance
-
BsonDocumentWriter
- Implements
- Inherited Members
- Extension Methods
Constructors
- BsonDocumentWriter(BsonDocument)
Initializes a new instance of the BsonDocumentWriter class.
- BsonDocumentWriter(BsonDocument, BsonDocumentWriterSettings)
Initializes a new instance of the BsonDocumentWriter class.
Properties
- Document
Gets the BsonDocument being written to.
- Position
Gets the position. Not all writers are able to report the position. Those that can't simply return zero.
Methods
- Close()
Closes the writer.
- Dispose(bool)
Disposes of any resources used by the writer.
- Flush()
Flushes any pending data to the output destination.
- WriteBinaryData(BsonBinaryData)
Writes BSON binary data to the writer.
- WriteBoolean(bool)
Writes a BSON Boolean to the writer.
- WriteBytes(byte[])
Writes BSON binary data to the writer.
- WriteDateTime(long)
Writes a BSON DateTime to the writer.
- WriteDecimal128(Decimal128)
Writes a BSON Decimal128 to the writer.
- WriteDouble(double)
Writes a BSON Double to the writer.
- WriteEndArray()
Writes the end of a BSON array to the writer.
- WriteEndDocument()
Writes the end of a BSON document to the writer.
- WriteInt32(int)
Writes a BSON Int32 to the writer.
- WriteInt64(long)
Writes a BSON Int64 to the writer.
- WriteJavaScript(string)
Writes a BSON JavaScript to the writer.
- WriteJavaScriptWithScope(string)
Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
- WriteMaxKey()
Writes a BSON MaxKey to the writer.
- WriteMinKey()
Writes a BSON MinKey to the writer.
- WriteName(string)
Writes the name of an element to the writer.
- WriteNull()
Writes a BSON null to the writer.
- WriteObjectId(ObjectId)
Writes a BSON ObjectId to the writer.
- WriteRegularExpression(BsonRegularExpression)
Writes a BSON regular expression to the writer.
- WriteStartArray()
Writes the start of a BSON array to the writer.
- WriteStartDocument()
Writes the start of a BSON document to the writer.
- WriteString(string)
Writes a BSON String to the writer.
- WriteSymbol(string)
Writes a BSON Symbol to the writer.
- WriteTimestamp(long)
Writes a BSON timestamp to the writer.
- WriteUndefined()
Writes a BSON undefined to the writer.