C# Class Newtonsoft.Json.Bson.BsonReader

Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Inheritance: JsonReader
显示文件 Open project: JamesNK/Newtonsoft.Json Class Usage Examples

Private Properties

Property Type Description
BytesInSequence int
EnsureBuffers void
GetLastFullCharStop int
GetString string
MovePosition void
PopContext void
PushContext void
ReadBinary byte[]
ReadByte byte
ReadBytes byte[]
ReadCodeWScope bool
ReadDouble double
ReadElement string
ReadInt32 int
ReadInt64 long
ReadLengthString string
ReadNormal bool
ReadReference bool
ReadString string
ReadType BsonType
ReadType void

Public Methods

Method Description
BsonReader ( BinaryReader reader ) : System

Initializes a new instance of the BsonReader class.

BsonReader ( BinaryReader reader, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling ) : System

Initializes a new instance of the BsonReader class.

BsonReader ( Stream stream ) : System

Initializes a new instance of the BsonReader class.

BsonReader ( Stream stream, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling ) : System

Initializes a new instance of the BsonReader class.

Close ( ) : void

Changes the reader's state to JsonReader.State.Closed.

Read ( ) : bool

Reads the next JSON token from the stream.

Private Methods

Method Description
BytesInSequence ( byte b ) : int
EnsureBuffers ( ) : void
GetLastFullCharStop ( int start ) : int
GetString ( int length ) : string
MovePosition ( int count ) : void
PopContext ( ) : void
PushContext ( ContainerContext newContext ) : void
ReadBinary ( BsonBinaryType &binaryType ) : byte[]
ReadByte ( ) : byte
ReadBytes ( int count ) : byte[]
ReadCodeWScope ( ) : bool
ReadDouble ( ) : double
ReadElement ( ) : string
ReadInt32 ( ) : int
ReadInt64 ( ) : long
ReadLengthString ( ) : string
ReadNormal ( ) : bool
ReadReference ( ) : bool
ReadString ( ) : string
ReadType ( ) : BsonType
ReadType ( BsonType type ) : void

Method Details

BsonReader() public method

Initializes a new instance of the BsonReader class.
public BsonReader ( BinaryReader reader ) : System
reader System.IO.BinaryReader The reader.
return System

BsonReader() public method

Initializes a new instance of the BsonReader class.
public BsonReader ( BinaryReader reader, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling ) : System
reader System.IO.BinaryReader The reader.
readRootValueAsArray bool if set to true the root object will be read as a JSON array.
dateTimeKindHandling DateTimeKind The used when reading values from BSON.
return System

BsonReader() public method

Initializes a new instance of the BsonReader class.
public BsonReader ( Stream stream ) : System
stream Stream The stream.
return System

BsonReader() public method

Initializes a new instance of the BsonReader class.
public BsonReader ( Stream stream, bool readRootValueAsArray, DateTimeKind dateTimeKindHandling ) : System
stream Stream The stream.
readRootValueAsArray bool if set to true the root object will be read as a JSON array.
dateTimeKindHandling DateTimeKind The used when reading values from BSON.
return System

Close() public method

Changes the reader's state to JsonReader.State.Closed.
public Close ( ) : void
return void

Read() public method

Reads the next JSON token from the stream.
public Read ( ) : bool
return bool