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
streamBsonStreamThe stream.
startPositionlongThe start position.
ReadBinarySubType(BsonStream)
Reads the binary sub type.
public static BsonBinarySubType ReadBinarySubType(this BsonStream stream)
Parameters
streamBsonStreamThe stream.
Returns
- BsonBinarySubType
The binary sub type.
ReadBoolean(BsonStream)
Reads a boolean from the stream.
public static bool ReadBoolean(this BsonStream stream)
Parameters
streamBsonStreamThe stream.
Returns
- bool
A boolean.
ReadBsonType(BsonStream)
Reads the BSON type.
public static BsonType ReadBsonType(this BsonStream stream)
Parameters
streamBsonStreamThe 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
streamBsonStreamThe stream.
bufferbyte[]The buffer.
offsetintThe offset.
countintThe count.
ReadBytes(BsonStream, int)
Reads bytes from the stream.
public static byte[] ReadBytes(this BsonStream stream, int count)
Parameters
streamBsonStreamThe stream.
countintThe 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
streamBsonStreamThe stream.
valueBsonBinarySubTypeThe value.
WriteBoolean(BsonStream, bool)
Writes a boolean to the stream.
public static void WriteBoolean(this BsonStream stream, bool value)
Parameters
streamBsonStreamThe stream.
valueboolThe value.
WriteBsonType(BsonStream, BsonType)
Writes a BsonType to the stream.
public static void WriteBsonType(this BsonStream stream, BsonType value)
Parameters
streamBsonStreamThe stream.
valueBsonTypeThe 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
streamBsonStreamThe stream.
bufferbyte[]The buffer.
offsetintThe offset.
countintThe count.
WriteSlice(BsonStream, IByteBuffer)
Writes a slice to the stream.
public static void WriteSlice(this BsonStream stream, IByteBuffer slice)
Parameters
streamBsonStreamThe stream.
sliceIByteBufferThe slice.