Table of Contents

Class BsonStreamExtensions

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

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 BsonStream

The stream.

startPosition long

The start position.

ReadBinarySubType(BsonStream)

Reads the binary sub type.

public static BsonBinarySubType ReadBinarySubType(this BsonStream stream)

Parameters

stream BsonStream

The stream.

Returns

BsonBinarySubType

The binary sub type.

ReadBoolean(BsonStream)

Reads a boolean from the stream.

public static bool ReadBoolean(this BsonStream stream)

Parameters

stream BsonStream

The stream.

Returns

bool

A boolean.

ReadBsonType(BsonStream)

Reads the BSON type.

public static BsonType ReadBsonType(this BsonStream stream)

Parameters

stream BsonStream

The 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 BsonStream

The stream.

buffer byte[]

The buffer.

offset int

The offset.

count int

The count.

ReadBytes(BsonStream, int)

Reads bytes from the stream.

public static byte[] ReadBytes(this BsonStream stream, int count)

Parameters

stream BsonStream

The stream.

count int

The 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 BsonStream

The stream.

value BsonBinarySubType

The value.

WriteBoolean(BsonStream, bool)

Writes a boolean to the stream.

public static void WriteBoolean(this BsonStream stream, bool value)

Parameters

stream BsonStream

The stream.

value bool

The value.

WriteBsonType(BsonStream, BsonType)

Writes a BsonType to the stream.

public static void WriteBsonType(this BsonStream stream, BsonType value)

Parameters

stream BsonStream

The stream.

value BsonType

The 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 BsonStream

The stream.

buffer byte[]

The buffer.

offset int

The offset.

count int

The count.

WriteSlice(BsonStream, IByteBuffer)

Writes a slice to the stream.

public static void WriteSlice(this BsonStream stream, IByteBuffer slice)

Parameters

stream BsonStream

The stream.

slice IByteBuffer

The slice.