C# Class HotChai.Serialization.ObjectReader

Reads a serialized object.
Inheritance: IObjectReader
显示文件 Open project: hotchai/serialize.net Class Usage Examples

Private Properties

Property Type Description
PopState void
PushState void
SetState void
SkipValue bool

Public Methods

Method Description
MoveToNextArrayValue ( ) : bool

Moves the reader to the next value in a serialized array.

ReadEndArray ( ) : void

Reads the end of a serialized object.

ReadEndObject ( ) : void

Reads the end of a serialized object.

ReadNextMemberKey ( ) : bool

Reads the key of the next member of the serialized object.

ReadStartArray ( ) : bool

Reads the start of a serialized array.

ReadStartObject ( ) : bool

Reads the start of a serialized object.

ReadValueAsBoolean ( ) : bool

Reads the current value as a Boolean type.

ReadValueAsBytes ( int byteQuota ) : byte[]

Reads the current value as an array of Byte.

ReadValueAsDouble ( ) : double

Reads the current value as a Double type.

ReadValueAsInt32 ( ) : int

Reads the current value as an Int32 type.

ReadValueAsInt64 ( ) : long

Reads the current value as an Int64 type.

ReadValueAsSingle ( ) : float

Reads the current value as a Single type.

ReadValueAsString ( int byteQuota ) : string

Reads the current value as a String type.

ReadValueAsUInt32 ( ) : uint

Reads the current value as a UInt32 type.

ReadValueAsUInt64 ( ) : ulong

Reads the current value as a UInt64 type.

Protected Methods

Method Description
ObjectReader ( ) : System
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.

ReadFirstObjectMemberKey ( ) : bool

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

The default implementation calls ReadNextObjectMemberKey().

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.

ReadToFirstArrayValue ( ) : bool

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

The default implementation calls ReadToNextArrayValue().

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
PopState ( ) : void
PushState ( ObjectReaderState state ) : void
SetState ( ObjectReaderState state ) : void
SkipValue ( ) : bool

Method Details

MoveToNextArrayValue() public method

Moves the reader to the next value in a serialized array.
public MoveToNextArrayValue ( ) : bool
return bool

ObjectReader() protected method

protected ObjectReader ( ) : System
return System

PeekValueType() protected abstract method

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

ReadEndArray() public method

Reads the end of a serialized object.
public ReadEndArray ( ) : void
return void

ReadEndArrayToken() protected abstract method

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

ReadEndObject() public method

Reads the end of a serialized object.
public ReadEndObject ( ) : void
return void

ReadEndObjectToken() protected abstract method

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

ReadFirstObjectMemberKey() protected method

Reads the first serialized object member key at the current position.
The default implementation calls ReadNextObjectMemberKey().
protected ReadFirstObjectMemberKey ( ) : bool
return bool

ReadNextMemberKey() public method

Reads the key of the next member of the serialized object.
public ReadNextMemberKey ( ) : bool
return bool

ReadNextObjectMemberKey() protected abstract method

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

ReadPrimitiveValueAsBoolean() protected abstract method

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

ReadPrimitiveValueAsBytes() protected abstract method

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

ReadPrimitiveValueAsDouble() protected abstract method

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

ReadPrimitiveValueAsInt32() protected abstract method

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

ReadPrimitiveValueAsInt64() protected abstract method

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

ReadPrimitiveValueAsSingle() protected abstract method

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

ReadPrimitiveValueAsString() protected abstract method

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

ReadPrimitiveValueAsUInt32() protected abstract method

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

ReadPrimitiveValueAsUInt64() protected abstract method

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

ReadStartArray() public method

Reads the start of a serialized array.
public ReadStartArray ( ) : bool
return bool

ReadStartArrayToken() protected abstract method

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

ReadStartObject() public method

Reads the start of a serialized object.
public ReadStartObject ( ) : bool
return bool

ReadStartObjectToken() protected abstract method

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

ReadToFirstArrayValue() protected method

Advances the reader to the first array value following the current position.
The default implementation calls ReadToNextArrayValue().
protected ReadToFirstArrayValue ( ) : bool
return bool

ReadToNextArrayValue() protected abstract method

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

ReadValueAsBoolean() public method

Reads the current value as a Boolean type.
public ReadValueAsBoolean ( ) : bool
return bool

ReadValueAsBytes() public method

Reads the current value as an array of Byte.
public ReadValueAsBytes ( int byteQuota ) : byte[]
byteQuota int
return byte[]

ReadValueAsDouble() public method

Reads the current value as a Double type.
public ReadValueAsDouble ( ) : double
return double

ReadValueAsInt32() public method

Reads the current value as an Int32 type.
public ReadValueAsInt32 ( ) : int
return int

ReadValueAsInt64() public method

Reads the current value as an Int64 type.
public ReadValueAsInt64 ( ) : long
return long

ReadValueAsSingle() public method

Reads the current value as a Single type.
public ReadValueAsSingle ( ) : float
return float

ReadValueAsString() public method

Reads the current value as a String type.
public ReadValueAsString ( int byteQuota ) : string
byteQuota int
return string

ReadValueAsUInt32() public method

Reads the current value as a UInt32 type.
public ReadValueAsUInt32 ( ) : uint
return uint

ReadValueAsUInt64() public method

Reads the current value as a UInt64 type.
public ReadValueAsUInt64 ( ) : ulong
return ulong

SkipPrimitiveValue() protected abstract method

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