C# Класс MongoDB.Bson.IO.BsonBinaryWriter

Represents a BSON writer to a BSON Stream.
Наследование: BsonWriter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BsonBinaryWriter ( MongoDB.Bson.IO.BsonBuffer buffer, bool disposeBuffer, BsonBinaryWriterSettings settings ) : System

Initializes a new instance of the BsonBinaryWriter class.

BsonBinaryWriter ( Stream stream, MongoDB.Bson.IO.BsonBuffer buffer, BsonBinaryWriterSettings settings ) : System

Initializes a new instance of the BsonBinaryWriter class.

Close ( ) : void

Closes the writer.

Flush ( ) : void

Flushes any pending data to the output destination.

PopMaxDocumentSize ( ) : void

Pops the max document size stack, restoring the previous max document size.

PushMaxDocumentSize ( int maxDocumentSize ) : void

Pushes a new max document size onto the max document size stack.

WriteBinaryData ( BsonBinaryData binaryData ) : void

Writes BSON binary data to the writer.

WriteBoolean ( bool value ) : void

Writes a BSON Boolean to the writer.

WriteBytes ( byte bytes ) : void

Writes BSON binary data to the writer.

WriteDateTime ( long value ) : void

Writes a BSON DateTime to the writer.

WriteDouble ( double value ) : void

Writes a BSON Double to the writer.

WriteEndArray ( ) : void

Writes the end of a BSON array to the writer.

WriteEndDocument ( ) : void

Writes the end of a BSON document to the writer.

WriteInt32 ( int value ) : void

Writes a BSON Int32 to the writer.

WriteInt64 ( long value ) : void

Writes a BSON Int64 to the writer.

WriteJavaScript ( string code ) : void

Writes a BSON JavaScript to the writer.

WriteJavaScriptWithScope ( string code ) : void

Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).

WriteMaxKey ( ) : void

Writes a BSON MaxKey to the writer.

WriteMinKey ( ) : void

Writes a BSON MinKey to the writer.

WriteNull ( ) : void

Writes a BSON null to the writer.

WriteObjectId ( ObjectId objectId ) : void

Writes a BSON ObjectId to the writer.

WriteRawBsonArray ( IByteBuffer slice ) : void

Writes a raw BSON array.

WriteRawBsonDocument ( IByteBuffer slice ) : void

Writes a raw BSON document.

WriteRegularExpression ( BsonRegularExpression regex ) : void

Writes a BSON regular expression to the writer.

WriteStartArray ( ) : void

Writes the start of a BSON array to the writer.

WriteStartDocument ( ) : void

Writes the start of a BSON document to the writer.

WriteString ( string value ) : void

Writes a BSON String to the writer.

WriteSymbol ( string value ) : void

Writes a BSON Symbol to the writer.

WriteTimestamp ( long value ) : void

Writes a BSON timestamp to the writer.

WriteUndefined ( ) : void

Writes a BSON undefined to the writer.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Disposes of any resources used by the writer.

Приватные методы

Метод Описание
BackpatchSize ( ) : void
GetNextState ( ) : BsonWriterState
WriteNameHelper ( ) : void

Описание методов

BsonBinaryWriter() публичный Метод

Initializes a new instance of the BsonBinaryWriter class.
/// encoder /// or /// settings ///
public BsonBinaryWriter ( MongoDB.Bson.IO.BsonBuffer buffer, bool disposeBuffer, BsonBinaryWriterSettings settings ) : System
buffer MongoDB.Bson.IO.BsonBuffer A BsonBuffer.
disposeBuffer bool if set to true this BsonBinaryReader will own the buffer and when Dispose is called the buffer will be Disposed also.
settings BsonBinaryWriterSettings Optional BsonBinaryWriter settings.
Результат System

BsonBinaryWriter() публичный Метод

Initializes a new instance of the BsonBinaryWriter class.
public BsonBinaryWriter ( Stream stream, MongoDB.Bson.IO.BsonBuffer buffer, BsonBinaryWriterSettings settings ) : System
stream Stream A stream.
buffer MongoDB.Bson.IO.BsonBuffer A BsonBuffer.
settings BsonBinaryWriterSettings Optional BsonBinaryWriter settings.
Результат System

Close() публичный Метод

Closes the writer.
public Close ( ) : void
Результат void

Dispose() защищенный Метод

Disposes of any resources used by the writer.
protected Dispose ( bool disposing ) : void
disposing bool True if called from Dispose.
Результат void

Flush() публичный Метод

Flushes any pending data to the output destination.
public Flush ( ) : void
Результат void

PopMaxDocumentSize() публичный Метод

Pops the max document size stack, restoring the previous max document size.
public PopMaxDocumentSize ( ) : void
Результат void

PushMaxDocumentSize() публичный Метод

Pushes a new max document size onto the max document size stack.
public PushMaxDocumentSize ( int maxDocumentSize ) : void
maxDocumentSize int The maximum size of the document.
Результат void

WriteBinaryData() публичный Метод

Writes BSON binary data to the writer.
public WriteBinaryData ( BsonBinaryData binaryData ) : void
binaryData BsonBinaryData The binary data.
Результат void

WriteBoolean() публичный Метод

Writes a BSON Boolean to the writer.
public WriteBoolean ( bool value ) : void
value bool The Boolean value.
Результат void

WriteBytes() публичный Метод

Writes BSON binary data to the writer.
public WriteBytes ( byte bytes ) : void
bytes byte The bytes.
Результат void

WriteDateTime() публичный Метод

Writes a BSON DateTime to the writer.
public WriteDateTime ( long value ) : void
value long The number of milliseconds since the Unix epoch.
Результат void

WriteDouble() публичный Метод

Writes a BSON Double to the writer.
public WriteDouble ( double value ) : void
value double The Double value.
Результат void

WriteEndArray() публичный Метод

Writes the end of a BSON array to the writer.
public WriteEndArray ( ) : void
Результат void

WriteEndDocument() публичный Метод

Writes the end of a BSON document to the writer.
public WriteEndDocument ( ) : void
Результат void

WriteInt32() публичный Метод

Writes a BSON Int32 to the writer.
public WriteInt32 ( int value ) : void
value int The Int32 value.
Результат void

WriteInt64() публичный Метод

Writes a BSON Int64 to the writer.
public WriteInt64 ( long value ) : void
value long The Int64 value.
Результат void

WriteJavaScript() публичный Метод

Writes a BSON JavaScript to the writer.
public WriteJavaScript ( string code ) : void
code string The JavaScript code.
Результат void

WriteJavaScriptWithScope() публичный Метод

Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
public WriteJavaScriptWithScope ( string code ) : void
code string The JavaScript code.
Результат void

WriteMaxKey() публичный Метод

Writes a BSON MaxKey to the writer.
public WriteMaxKey ( ) : void
Результат void

WriteMinKey() публичный Метод

Writes a BSON MinKey to the writer.
public WriteMinKey ( ) : void
Результат void

WriteNull() публичный Метод

Writes a BSON null to the writer.
public WriteNull ( ) : void
Результат void

WriteObjectId() публичный Метод

Writes a BSON ObjectId to the writer.
public WriteObjectId ( ObjectId objectId ) : void
objectId ObjectId The ObjectId.
Результат void

WriteRawBsonArray() публичный Метод

Writes a raw BSON array.
public WriteRawBsonArray ( IByteBuffer slice ) : void
slice IByteBuffer The byte buffer containing the raw BSON array.
Результат void

WriteRawBsonDocument() публичный Метод

Writes a raw BSON document.
public WriteRawBsonDocument ( IByteBuffer slice ) : void
slice IByteBuffer The byte buffer containing the raw BSON document.
Результат void

WriteRegularExpression() публичный Метод

Writes a BSON regular expression to the writer.
public WriteRegularExpression ( BsonRegularExpression regex ) : void
regex BsonRegularExpression A BsonRegularExpression.
Результат void

WriteStartArray() публичный Метод

Writes the start of a BSON array to the writer.
public WriteStartArray ( ) : void
Результат void

WriteStartDocument() публичный Метод

Writes the start of a BSON document to the writer.
public WriteStartDocument ( ) : void
Результат void

WriteString() публичный Метод

Writes a BSON String to the writer.
public WriteString ( string value ) : void
value string The String value.
Результат void

WriteSymbol() публичный Метод

Writes a BSON Symbol to the writer.
public WriteSymbol ( string value ) : void
value string The symbol.
Результат void

WriteTimestamp() публичный Метод

Writes a BSON timestamp to the writer.
public WriteTimestamp ( long value ) : void
value long The combined timestamp/increment value.
Результат void

WriteUndefined() публичный Метод

Writes a BSON undefined to the writer.
public WriteUndefined ( ) : void
Результат void