Class BsonStreamExtensions
Represents extension methods on BsonStream.
public static class BsonStreamExtensions
- Inheritance
-
BsonStreamExtensions
- Inherited Members
Methods
BackpatchSize(BsonStream, long)
Backpatches the size.
public static void BackpatchSize(this BsonStream stream, long startPosition)
Parameters
stream
BsonStreamThe stream.
startPosition
longThe start position.
ReadBinarySubType(BsonStream)
Reads the binary sub type.
public static BsonBinarySubType ReadBinarySubType(this BsonStream stream)
Parameters
stream
BsonStreamThe stream.
Returns
- BsonBinarySubType
The binary sub type.
ReadBoolean(BsonStream)
Reads a boolean from the stream.
public static bool ReadBoolean(this BsonStream stream)
Parameters
stream
BsonStreamThe stream.
Returns
- bool
A boolean.
ReadBsonType(BsonStream)
Reads the BSON type.
public static BsonType ReadBsonType(this BsonStream stream)
Parameters
stream
BsonStreamThe stream.
Returns
- BsonType
The BSON type.
ReadBytes(BsonStream, byte[], int, int)
Reads bytes from the stream.
public static void ReadBytes(this BsonStream stream, byte[] buffer, int offset, int count)
Parameters
stream
BsonStreamThe stream.
buffer
byte[]The buffer.
offset
intThe offset.
count
intThe count.
ReadBytes(BsonStream, int)
Reads bytes from the stream.
public static byte[] ReadBytes(this BsonStream stream, int count)
Parameters
stream
BsonStreamThe stream.
count
intThe count.
Returns
- byte[]
The bytes.
WriteBinarySubType(BsonStream, BsonBinarySubType)
Writes a binary sub type to the stream.
public static void WriteBinarySubType(this BsonStream stream, BsonBinarySubType value)
Parameters
stream
BsonStreamThe stream.
value
BsonBinarySubTypeThe value.
WriteBoolean(BsonStream, bool)
Writes a boolean to the stream.
public static void WriteBoolean(this BsonStream stream, bool value)
Parameters
stream
BsonStreamThe stream.
value
boolThe value.
WriteBsonType(BsonStream, BsonType)
Writes a BsonType to the stream.
public static void WriteBsonType(this BsonStream stream, BsonType value)
Parameters
stream
BsonStreamThe stream.
value
BsonTypeThe value.
WriteBytes(BsonStream, byte[], int, int)
Writes bytes to the stream.
public static void WriteBytes(this BsonStream stream, byte[] buffer, int offset, int count)
Parameters
stream
BsonStreamThe stream.
buffer
byte[]The buffer.
offset
intThe offset.
count
intThe count.
WriteSlice(BsonStream, IByteBuffer)
Writes a slice to the stream.
public static void WriteSlice(this BsonStream stream, IByteBuffer slice)
Parameters
stream
BsonStreamThe stream.
slice
IByteBufferThe slice.