C# Class MongoDB.Bson.IO.BsonDocumentWriter

Represents a BSON writer to a BsonDocument.
Inheritance: MongoDB.Bson.IO.BsonBaseWriter
Afficher le fichier Open project: egametang/Egametang Class Usage Examples

Méthodes publiques

Méthode Description
BsonDocumentWriter ( BsonDocument topLevelDocument, BsonDocumentWriterSettings settings ) : System

Initializes a new instance of the BsonDocumentWriter class.

Close ( ) : void

Closes the writer.

Flush ( ) : void

Flushes any pending data to the output destination.

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.

WriteName ( string name ) : void

Writes the name of an element to the writer.

WriteNull ( ) : void

Writes a BSON null to the writer.

WriteObjectId ( ObjectId objectId ) : void

Writes a BSON ObjectId to the writer.

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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposes of any resources used by the writer.

Private Methods

Méthode Description
GetNextState ( ) : BsonWriterState
WriteValue ( BsonValue value ) : void

Method Details

BsonDocumentWriter() public méthode

Initializes a new instance of the BsonDocumentWriter class.
public BsonDocumentWriter ( BsonDocument topLevelDocument, BsonDocumentWriterSettings settings ) : System
topLevelDocument BsonDocument The document to write to (normally starts out as an empty document).
settings BsonDocumentWriterSettings The settings.
Résultat System

Close() public méthode

Closes the writer.
public Close ( ) : void
Résultat void

Dispose() protected méthode

Disposes of any resources used by the writer.
protected Dispose ( bool disposing ) : void
disposing bool True if called from Dispose.
Résultat void

Flush() public méthode

Flushes any pending data to the output destination.
public Flush ( ) : void
Résultat void

WriteBinaryData() public méthode

Writes BSON binary data to the writer.
public WriteBinaryData ( BsonBinaryData binaryData ) : void
binaryData BsonBinaryData The binary data.
Résultat void

WriteBoolean() public méthode

Writes a BSON Boolean to the writer.
public WriteBoolean ( bool value ) : void
value bool The Boolean value.
Résultat void

WriteBytes() public méthode

Writes BSON binary data to the writer.
public WriteBytes ( byte bytes ) : void
bytes byte The bytes.
Résultat void

WriteDateTime() public méthode

Writes a BSON DateTime to the writer.
public WriteDateTime ( long value ) : void
value long The number of milliseconds since the Unix epoch.
Résultat void

WriteDouble() public méthode

Writes a BSON Double to the writer.
public WriteDouble ( double value ) : void
value double The Double value.
Résultat void

WriteEndArray() public méthode

Writes the end of a BSON array to the writer.
public WriteEndArray ( ) : void
Résultat void

WriteEndDocument() public méthode

Writes the end of a BSON document to the writer.
public WriteEndDocument ( ) : void
Résultat void

WriteInt32() public méthode

Writes a BSON Int32 to the writer.
public WriteInt32 ( int value ) : void
value int The Int32 value.
Résultat void

WriteInt64() public méthode

Writes a BSON Int64 to the writer.
public WriteInt64 ( long value ) : void
value long The Int64 value.
Résultat void

WriteJavaScript() public méthode

Writes a BSON JavaScript to the writer.
public WriteJavaScript ( string code ) : void
code string The JavaScript code.
Résultat void

WriteJavaScriptWithScope() public méthode

Writes a BSON JavaScript to the writer (call WriteStartDocument to start writing the scope).
public WriteJavaScriptWithScope ( string code ) : void
code string The JavaScript code.
Résultat void

WriteMaxKey() public méthode

Writes a BSON MaxKey to the writer.
public WriteMaxKey ( ) : void
Résultat void

WriteMinKey() public méthode

Writes a BSON MinKey to the writer.
public WriteMinKey ( ) : void
Résultat void

WriteName() public méthode

Writes the name of an element to the writer.
public WriteName ( string name ) : void
name string The name of the element.
Résultat void

WriteNull() public méthode

Writes a BSON null to the writer.
public WriteNull ( ) : void
Résultat void

WriteObjectId() public méthode

Writes a BSON ObjectId to the writer.
public WriteObjectId ( ObjectId objectId ) : void
objectId ObjectId The ObjectId.
Résultat void

WriteRegularExpression() public méthode

Writes a BSON regular expression to the writer.
public WriteRegularExpression ( BsonRegularExpression regex ) : void
regex BsonRegularExpression A BsonRegularExpression.
Résultat void

WriteStartArray() public méthode

Writes the start of a BSON array to the writer.
public WriteStartArray ( ) : void
Résultat void

WriteStartDocument() public méthode

Writes the start of a BSON document to the writer.
public WriteStartDocument ( ) : void
Résultat void

WriteString() public méthode

Writes a BSON String to the writer.
public WriteString ( string value ) : void
value string The String value.
Résultat void

WriteSymbol() public méthode

Writes a BSON Symbol to the writer.
public WriteSymbol ( string value ) : void
value string The symbol.
Résultat void

WriteTimestamp() public méthode

Writes a BSON timestamp to the writer.
public WriteTimestamp ( long value ) : void
value long The combined timestamp/increment value.
Résultat void

WriteUndefined() public méthode

Writes a BSON undefined to the writer.
public WriteUndefined ( ) : void
Résultat void