C# Class MongoDB.Driver.BsonReader

Inheritance: System.IO.BinaryReader
Show file Open project: dannycoates/mongo-clr4-driver Class Usage Examples

Public Methods

Method Description
BsonReader ( Stream stream ) : System
ReadByte ( ) : byte
ReadDBRef ( ) : DBRef
ReadDate ( ) : System.DateTime
ReadDoc ( ) : Doc
ReadMessageHeader ( ) : MessageHeader
ReadObjectId ( ) : ObjectId
ReadReplyMessage ( ) : ReplyMessage
ReadShortString ( ) : string

Reads a string of unknown length but less than 1024 bytes

In the BSON spec there are two cases where the string length is not given: Element names of objects and regex strings. Since element names are very common, and are most likely short this method WILL FAIL unappologetically for strings longer than 1024 bytes. You have been warned!

ReadString ( int length ) : string

Method Details

BsonReader() public method

public BsonReader ( Stream stream ) : System
stream Stream
return System

ReadByte() public method

public ReadByte ( ) : byte
return byte

ReadDBRef() public method

public ReadDBRef ( ) : DBRef
return DBRef

ReadDate() public method

public ReadDate ( ) : System.DateTime
return System.DateTime

ReadDoc() public method

public ReadDoc ( ) : Doc
return Doc

ReadMessageHeader() public method

public ReadMessageHeader ( ) : MessageHeader
return MessageHeader

ReadObjectId() public method

public ReadObjectId ( ) : ObjectId
return MongoDB.Types.ObjectId

ReadReplyMessage() public method

public ReadReplyMessage ( ) : ReplyMessage
return ReplyMessage

ReadShortString() public method

Reads a string of unknown length but less than 1024 bytes
In the BSON spec there are two cases where the string length is not given: Element names of objects and regex strings. Since element names are very common, and are most likely short this method WILL FAIL unappologetically for strings longer than 1024 bytes. You have been warned!
public ReadShortString ( ) : string
return string

ReadString() public method

public ReadString ( int length ) : string
length int
return string