Click or drag to resize
BsonDocumentWriter Methods

The BsonDocumentWriter type exposes the following members.

Methods
  NameDescription
Public methodClose
Closes the writer.
(Overrides BsonWriterClose.)
Public methodDispose
Disposes of any resources used by the writer.
(Inherited from BsonWriter.)
Protected methodDispose(Boolean)
Disposes of any resources used by the writer.
(Overrides BsonWriterDispose(Boolean).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFlush
Flushes any pending data to the output destination.
(Overrides BsonWriterFlush.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPopElementNameValidator
Pops the element name validator.
(Inherited from BsonWriter.)
Public methodPushElementNameValidator
Pushes the element name validator.
(Inherited from BsonWriter.)
Protected methodThrowInvalidContextType
Throws an InvalidOperationException when the method called is not valid for the current ContextType.
(Inherited from BsonWriter.)
Protected methodThrowInvalidState
Throws an InvalidOperationException when the method called is not valid for the current state.
(Inherited from BsonWriter.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteBinaryData
Writes BSON binary data to the writer.
(Overrides BsonWriterWriteBinaryData(BsonBinaryData).)
Public methodWriteBoolean
Writes a BSON Boolean to the writer.
(Overrides BsonWriterWriteBoolean(Boolean).)
Public methodWriteBytes
Writes BSON binary data to the writer.
(Overrides BsonWriterWriteBytes(Byte).)
Public methodWriteDateTime
Writes a BSON DateTime to the writer.
(Overrides BsonWriterWriteDateTime(Int64).)
Public methodWriteDouble
Writes a BSON Double to the writer.
(Overrides BsonWriterWriteDouble(Double).)
Public methodWriteEndArray
Writes the end of a BSON array to the writer.
(Overrides BsonWriterWriteEndArray.)
Public methodWriteEndDocument
Writes the end of a BSON document to the writer.
(Overrides BsonWriterWriteEndDocument.)
Public methodWriteInt32
Writes a BSON Int32 to the writer.
(Overrides BsonWriterWriteInt32(Int32).)
Public methodWriteInt64
Writes a BSON Int64 to the writer.
(Overrides BsonWriterWriteInt64(Int64).)
Public methodWriteJavaScript
Writes a BSON JavaScript to the writer.
(Overrides BsonWriterWriteJavaScript(String).)
Public methodWriteJavaScriptWithScope
Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
(Overrides BsonWriterWriteJavaScriptWithScope(String).)
Public methodWriteMaxKey
Writes a BSON MaxKey to the writer.
(Overrides BsonWriterWriteMaxKey.)
Public methodWriteMinKey
Writes a BSON MinKey to the writer.
(Overrides BsonWriterWriteMinKey.)
Public methodWriteName
Writes the name of an element to the writer.
(Overrides BsonWriterWriteName(String).)
Public methodWriteNull
Writes a BSON null to the writer.
(Overrides BsonWriterWriteNull.)
Public methodWriteObjectId
Writes a BSON ObjectId to the writer.
(Overrides BsonWriterWriteObjectId(ObjectId).)
Public methodWriteRawBsonArray
Writes a raw BSON array.
(Inherited from BsonWriter.)
Public methodWriteRawBsonDocument
Writes a raw BSON document.
(Inherited from BsonWriter.)
Public methodWriteRegularExpression
Writes a BSON regular expression to the writer.
(Overrides BsonWriterWriteRegularExpression(BsonRegularExpression).)
Public methodWriteStartArray
Writes the start of a BSON array to the writer.
(Overrides BsonWriterWriteStartArray.)
Public methodWriteStartDocument
Writes the start of a BSON document to the writer.
(Overrides BsonWriterWriteStartDocument.)
Public methodWriteString
Writes a BSON String to the writer.
(Overrides BsonWriterWriteString(String).)
Public methodWriteSymbol
Writes a BSON Symbol to the writer.
(Overrides BsonWriterWriteSymbol(String).)
Public methodWriteTimestamp
Writes a BSON timestamp to the writer.
(Overrides BsonWriterWriteTimestamp(Int64).)
Public methodWriteUndefined
Writes a BSON undefined to the writer.
(Overrides BsonWriterWriteUndefined.)
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also