C# Class HotChai.Serialization.PortableBinary.PortableBinaryObjectReader

Reads an object using the Portable Binary Object Notation format.
Inheritance: ObjectReader
Exibir arquivo Open project: hotchai/serialize.net

Public Methods

Method Description
PortableBinaryObjectReader ( Stream stream ) : System

Initializes a new instance of the PortableBinaryObjectReader using the specified input stream.

Protected Methods

Method Description
PeekValueType ( ) : MemberValueType

Returns the MemberType of the value at the current reader position, without advancing the reader.

ReadEndArrayToken ( ) : void

Reads the end of the serialized array at the current position.

ReadEndObjectToken ( ) : void

Reads the end of the serialized object at the current position.

ReadNextObjectMemberKey ( ) : bool

Reads the next serialized object member key at the current position.

ReadPrimitiveValueAsBoolean ( ) : bool

Reads the current value as a Boolean type.

ReadPrimitiveValueAsBytes ( int quota ) : byte[]

Reads the current value as an array of Byte type.

ReadPrimitiveValueAsDouble ( ) : double

Reads the current value as a Double type.

ReadPrimitiveValueAsInt32 ( ) : int

Reads the current value as an Int32 type.

ReadPrimitiveValueAsInt64 ( ) : long

Reads the current value as an Int64 type.

ReadPrimitiveValueAsSingle ( ) : float

Reads the current value as a Single type.

ReadPrimitiveValueAsString ( int quota ) : string

Reads the current value as a String type.

ReadPrimitiveValueAsUInt32 ( ) : uint

Reads the current value as a UInt32 type.

ReadPrimitiveValueAsUInt64 ( ) : ulong

Reads the current value as a UInt64 type.

ReadStartArrayToken ( ) : bool

Reads the start of a serialized array at the current position.

ReadStartObjectToken ( ) : bool

Reads the start of a serialized object at the current position.

ReadToNextArrayValue ( ) : bool

Advances the reader to the next array value following the current position.

SkipPrimitiveValue ( ) : void

Skips the primitive value at the current reader position.

Private Methods

Method Description
PeekPackedInt ( ) : int
ReadNullablePrimitiveLength ( int quota ) : int
ReadPackedInt ( ) : int

Big-endian variable-length quantity (VLQ) encoding

See http://en.wikipedia.org/wiki/Variable-length_quantity.

ReadPrimitiveLength ( int quota ) : int
TrySkipBytes ( int count ) : bool

Method Details

PeekValueType() protected method

Returns the MemberType of the value at the current reader position, without advancing the reader.
protected PeekValueType ( ) : MemberValueType
return MemberValueType

PortableBinaryObjectReader() public method

Initializes a new instance of the PortableBinaryObjectReader using the specified input stream.
public PortableBinaryObjectReader ( Stream stream ) : System
stream Stream The input stream.
return System

ReadEndArrayToken() protected method

Reads the end of the serialized array at the current position.
protected ReadEndArrayToken ( ) : void
return void

ReadEndObjectToken() protected method

Reads the end of the serialized object at the current position.
protected ReadEndObjectToken ( ) : void
return void

ReadNextObjectMemberKey() protected method

Reads the next serialized object member key at the current position.
protected ReadNextObjectMemberKey ( ) : bool
return bool

ReadPrimitiveValueAsBoolean() protected method

Reads the current value as a Boolean type.
protected ReadPrimitiveValueAsBoolean ( ) : bool
return bool

ReadPrimitiveValueAsBytes() protected method

Reads the current value as an array of Byte type.
protected ReadPrimitiveValueAsBytes ( int quota ) : byte[]
quota int
return byte[]

ReadPrimitiveValueAsDouble() protected method

Reads the current value as a Double type.
protected ReadPrimitiveValueAsDouble ( ) : double
return double

ReadPrimitiveValueAsInt32() protected method

Reads the current value as an Int32 type.
protected ReadPrimitiveValueAsInt32 ( ) : int
return int

ReadPrimitiveValueAsInt64() protected method

Reads the current value as an Int64 type.
protected ReadPrimitiveValueAsInt64 ( ) : long
return long

ReadPrimitiveValueAsSingle() protected method

Reads the current value as a Single type.
protected ReadPrimitiveValueAsSingle ( ) : float
return float

ReadPrimitiveValueAsString() protected method

Reads the current value as a String type.
protected ReadPrimitiveValueAsString ( int quota ) : string
quota int
return string

ReadPrimitiveValueAsUInt32() protected method

Reads the current value as a UInt32 type.
protected ReadPrimitiveValueAsUInt32 ( ) : uint
return uint

ReadPrimitiveValueAsUInt64() protected method

Reads the current value as a UInt64 type.
protected ReadPrimitiveValueAsUInt64 ( ) : ulong
return ulong

ReadStartArrayToken() protected method

Reads the start of a serialized array at the current position.
protected ReadStartArrayToken ( ) : bool
return bool

ReadStartObjectToken() protected method

Reads the start of a serialized object at the current position.
protected ReadStartObjectToken ( ) : bool
return bool

ReadToNextArrayValue() protected method

Advances the reader to the next array value following the current position.
protected ReadToNextArrayValue ( ) : bool
return bool

SkipPrimitiveValue() protected method

Skips the primitive value at the current reader position.
protected SkipPrimitiveValue ( ) : void
return void