Class BsonWriter
Represents a BSON writer for some external format (see subclasses).
- Inheritance
-
Bson
Writer
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
- Bson
Writer(Bson Writer Settings) Initializes a new instance of the BsonWriter class.
Properties
- Disposed
Gets whether the BsonWriter has been disposed.
- Name
Gets the name of the element being written.
- Position
Gets the position. Not all writers are able to report the position. Those that can't simply return zero.
- Serialization
Depth Gets the current serialization depth.
- Settings
Gets the settings of the writer.
- State
Gets the current state of the writer.
Methods
- Close()
Closes the writer.
- Dispose()
Disposes of any resources used by the writer.
- Dispose(bool)
Disposes of any resources used by the writer.
- Flush()
Flushes any pending data to the output destination.
- Pop
Element Name Validator() Pops the element name validator.
- Pop
Settings() Pops the settings.
- Push
Element Name Validator(IElement Name Validator) Pushes the element name validator.
- PushSettings(Action<BsonWriterSettings>)
Pushes new settings for the writer.
- Throw
Invalid Context Type(string, Context Type, params Context Type[]) Throws an InvalidOperationException when the method called is not valid for the current ContextType.
- Throw
Invalid State(string, params Bson Writer State[]) Throws an InvalidOperationException when the method called is not valid for the current state.
- Write
Binary Data(Bson Binary Data) Writes BSON binary data to the writer.
- Write
Boolean(bool) Writes a BSON Boolean to the writer.
- Write
Bytes(byte[]) Writes BSON binary data to the writer.
- Write
Date Time(long) Writes a BSON DateTime to the writer.
- Write
Decimal128(Decimal128) Writes a BSON Decimal128 to the writer.
- Write
Double(double) Writes a BSON Double to the writer.
- Write
End Array() Writes the end of a BSON array to the writer.
- Write
End Document() Writes the end of a BSON document to the writer.
- Write
Guid(Guid) Writes a Guid in Standard representation to the writer.
- Write
Guid(Guid, Guid Representation) Writes a Guid in the specified representation to the writer.
- Write
Int32(int) Writes a BSON Int32 to the writer.
- Write
Int64(long) Writes a BSON Int64 to the writer.
- Write
Java Script(string) Writes a BSON JavaScript to the writer.
- Write
Java Script With Scope(string) Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
- Write
Max Key() Writes a BSON MaxKey to the writer.
- Write
Min Key() Writes a BSON MinKey to the writer.
- Write
Name(string) Writes the name of an element to the writer.
- Write
Null() Writes a BSON null to the writer.
- Write
Object Id(Object Id) Writes a BSON ObjectId to the writer.
- Write
Raw Bson Array(IByte Buffer) Writes a raw BSON array.
- Write
Raw Bson Document(IByte Buffer) Writes a raw BSON document.
- Write
Regular Expression(Bson Regular Expression) Writes a BSON regular expression to the writer.
- Write
Start Array() Writes the start of a BSON array to the writer.
- Write
Start Document() Writes the start of a BSON document to the writer.
- Write
String(string) Writes a BSON String to the writer.
- Write
Symbol(string) Writes a BSON Symbol to the writer.
- Write
Timestamp(long) Writes a BSON timestamp to the writer.
- Write
Undefined() Writes a BSON undefined to the writer.