C# Class MongoDB.Bson.IO.SingleChunkBuffer

An IBsonBuffer that only has a single chunk.
Inheritance: ByteArrayBuffer
Mostrar archivo Open project: egametang/Egametang Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clears this instance.

GetSlice ( int position, int length ) : IByteBuffer

Gets a slice of this buffer.

SingleChunkBuffer ( MongoDB.Bson.IO.BsonChunk chunk, int sliceOffset, int length, bool isReadOnly ) : System

Initializes a new instance of the SingleChunkBuffer class.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
GetChunkBytes ( MongoDB.Bson.IO.BsonChunk chunk ) : byte[]

Method Details

Clear() public method

Clears this instance.
SingleChunkBuffer Write operations are not allowed for read only buffers.
public Clear ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetSlice() public method

Gets a slice of this buffer.
SingleChunkBuffer GetSlice can only be called for read only buffers. /// position /// or /// length ///
public GetSlice ( int position, int length ) : IByteBuffer
position int The position of the start of the slice.
length int The length of the slice.
return IByteBuffer

SingleChunkBuffer() public method

Initializes a new instance of the SingleChunkBuffer class.
public SingleChunkBuffer ( MongoDB.Bson.IO.BsonChunk chunk, int sliceOffset, int length, bool isReadOnly ) : System
chunk MongoDB.Bson.IO.BsonChunk The chunk.
sliceOffset int The slice offset.
length int The length.
isReadOnly bool Whether the buffer is read only.
return System