Class IBsonWriterExtensions
Contains extension methods for IBsonWriter.
public static class IBsonWriterExtensions
- Inheritance
-
IBsonWriterExtensions
- Inherited Members
Methods
WriteBinaryData(IBsonWriter, string, BsonBinaryData)
Writes a BSON binary data element to the writer.
public static void WriteBinaryData(this IBsonWriter writer, string name, BsonBinaryData binaryData)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
binaryData
BsonBinaryDataThe binary data.
WriteBoolean(IBsonWriter, string, bool)
Writes a BSON Boolean element to the writer.
public static void WriteBoolean(this IBsonWriter writer, string name, bool value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
boolThe Boolean value.
WriteBytes(IBsonWriter, string, byte[])
Writes a BSON binary data element to the writer.
public static void WriteBytes(this IBsonWriter writer, string name, byte[] bytes)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
bytes
byte[]The bytes.
WriteDateTime(IBsonWriter, string, long)
Writes a BSON DateTime element to the writer.
public static void WriteDateTime(this IBsonWriter writer, string name, long value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
longThe number of milliseconds since the Unix epoch.
WriteDecimal128(IBsonWriter, string, Decimal128)
Writes a BSON Decimal128 element to the writer.
public static void WriteDecimal128(this IBsonWriter writer, string name, Decimal128 value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
Decimal128The Decimal128 value.
WriteDouble(IBsonWriter, string, double)
Writes a BSON Double element to the writer.
public static void WriteDouble(this IBsonWriter writer, string name, double value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
doubleThe Double value.
WriteInt32(IBsonWriter, string, int)
Writes a BSON Int32 element to the writer.
public static void WriteInt32(this IBsonWriter writer, string name, int value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
intThe Int32 value.
WriteInt64(IBsonWriter, string, long)
Writes a BSON Int64 element to the writer.
public static void WriteInt64(this IBsonWriter writer, string name, long value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
longThe Int64 value.
WriteJavaScript(IBsonWriter, string, string)
Writes a BSON JavaScript element to the writer.
public static void WriteJavaScript(this IBsonWriter writer, string name, string code)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
code
stringThe JavaScript code.
WriteJavaScriptWithScope(IBsonWriter, string, string)
Writes a BSON JavaScript element to the writer (call WriteStartDocument to start writing the scope).
public static void WriteJavaScriptWithScope(this IBsonWriter writer, string name, string code)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
code
stringThe JavaScript code.
WriteMaxKey(IBsonWriter, string)
Writes a BSON MaxKey element to the writer.
public static void WriteMaxKey(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
WriteMinKey(IBsonWriter, string)
Writes a BSON MinKey element to the writer.
public static void WriteMinKey(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
WriteNull(IBsonWriter, string)
Writes a BSON null element to the writer.
public static void WriteNull(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
WriteObjectId(IBsonWriter, string, ObjectId)
Writes a BSON ObjectId element to the writer.
public static void WriteObjectId(this IBsonWriter writer, string name, ObjectId objectId)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
objectId
ObjectIdThe ObjectId.
WriteRawBsonArray(IBsonWriter, string, IByteBuffer)
Writes a raw BSON array.
public static void WriteRawBsonArray(this IBsonWriter writer, string name, IByteBuffer slice)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name.
slice
IByteBufferThe byte buffer containing the raw BSON array.
WriteRawBsonDocument(IBsonWriter, string, IByteBuffer)
Writes a raw BSON document.
public static void WriteRawBsonDocument(this IBsonWriter writer, string name, IByteBuffer slice)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name.
slice
IByteBufferThe byte buffer containing the raw BSON document.
WriteRegularExpression(IBsonWriter, string, BsonRegularExpression)
Writes a BSON regular expression element to the writer.
public static void WriteRegularExpression(this IBsonWriter writer, string name, BsonRegularExpression regex)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
regex
BsonRegularExpressionA BsonRegularExpression.
WriteStartArray(IBsonWriter, string)
Writes the start of a BSON array element to the writer.
public static void WriteStartArray(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
WriteStartDocument(IBsonWriter, string)
Writes the start of a BSON document element to the writer.
public static void WriteStartDocument(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
WriteString(IBsonWriter, string, string)
Writes a BSON String element to the writer.
public static void WriteString(this IBsonWriter writer, string name, string value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
stringThe String value.
WriteSymbol(IBsonWriter, string, string)
Writes a BSON Symbol element to the writer.
public static void WriteSymbol(this IBsonWriter writer, string name, string value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
stringThe symbol.
WriteTimestamp(IBsonWriter, string, long)
Writes a BSON timestamp element to the writer.
public static void WriteTimestamp(this IBsonWriter writer, string name, long value)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.
value
longThe combined timestamp/increment value.
WriteUndefined(IBsonWriter, string)
Writes a BSON undefined element to the writer.
public static void WriteUndefined(this IBsonWriter writer, string name)
Parameters
writer
IBsonWriterThe writer.
name
stringThe name of the element.