C# Class Sanguosha.Core.Utils.RawSerializer

Raw serializer class. Serializes value types and structs whose length can be determined by the marshaller.
Datei anzeigen Open project: RagingBigFemaleBird/sgs Class Usage Examples

Protected Properties

Property Type Description
bw System.IO.BinaryWriter
tw TypeIO

Public Methods

Method Description
Close ( ) : void

Close the stream.

Flush ( ) : void

Flush the stream.

RawSerializer ( Stream output ) : System

Constructor.

Serialize ( System.DateTime val ) : void
Serialize ( System.Guid val ) : void
Serialize ( ObjectInfo objs ) : void

Serialize an array of objects that specify the nullable state flag.

Serialize ( bool val ) : void
Serialize ( byte val ) : void
Serialize ( char val ) : void
Serialize ( decimal val ) : void
Serialize ( double val ) : void
Serialize ( float val ) : void
Serialize ( int val ) : void
Serialize ( long val ) : void
Serialize ( object val ) : void

Serialize a boxed value assuming nullable is false.

Serialize ( sbyte val ) : void
Serialize ( short val ) : void
Serialize ( string val ) : void
Serialize ( uint val ) : void
Serialize ( ulong val ) : void
Serialize ( ushort val ) : void
SerializeNullable ( object val ) : void

Serialize a boxed value specifying the nullable state.

WriteNullFlag ( object val ) : bool
WriteSimpleNullFlag ( object val ) : bool

Protected Methods

Method Description
InternalSerialize ( object val ) : void
SerializeStruct ( object val ) : void

Virtual method to manage serializing structures, using the Marshaller. Override this method to handle structs that the marshaller doesn't.

Method Details

Close() public method

Close the stream.
public Close ( ) : void
return void

Flush() public method

Flush the stream.
public Flush ( ) : void
return void

InternalSerialize() protected method

protected InternalSerialize ( object val ) : void
val object
return void

RawSerializer() public method

Constructor.
public RawSerializer ( Stream output ) : System
output Stream The output stream.
return System

Serialize() public method

public Serialize ( System.DateTime val ) : void
val System.DateTime
return void

Serialize() public method

public Serialize ( System.Guid val ) : void
val System.Guid
return void

Serialize() public method

Serialize an array of objects that specify the nullable state flag.
public Serialize ( ObjectInfo objs ) : void
objs ObjectInfo An array of ObjectInfo instance.
return void

Serialize() public method

public Serialize ( bool val ) : void
val bool
return void

Serialize() public method

public Serialize ( byte val ) : void
val byte
return void

Serialize() public method

public Serialize ( char val ) : void
val char
return void

Serialize() public method

public Serialize ( decimal val ) : void
val decimal
return void

Serialize() public method

public Serialize ( double val ) : void
val double
return void

Serialize() public method

public Serialize ( float val ) : void
val float
return void

Serialize() public method

public Serialize ( int val ) : void
val int
return void

Serialize() public method

public Serialize ( long val ) : void
val long
return void

Serialize() public method

Serialize a boxed value assuming nullable is false.
public Serialize ( object val ) : void
val object The value.
return void

Serialize() public method

public Serialize ( sbyte val ) : void
val sbyte
return void

Serialize() public method

public Serialize ( short val ) : void
val short
return void

Serialize() public method

public Serialize ( string val ) : void
val string
return void

Serialize() public method

public Serialize ( uint val ) : void
val uint
return void

Serialize() public method

public Serialize ( ulong val ) : void
val ulong
return void

Serialize() public method

public Serialize ( ushort val ) : void
val ushort
return void

SerializeNullable() public method

Serialize a boxed value specifying the nullable state.
public SerializeNullable ( object val ) : void
val object The value.
return void

SerializeStruct() protected method

Virtual method to manage serializing structures, using the Marshaller. Override this method to handle structs that the marshaller doesn't.
protected SerializeStruct ( object val ) : void
val object The struct to serialize.
return void

WriteNullFlag() public method

public WriteNullFlag ( object val ) : bool
val object
return bool

WriteSimpleNullFlag() public method

public WriteSimpleNullFlag ( object val ) : bool
val object
return bool

Property Details

bw protected_oe property

The binary writer instance to which value types are written.
protected BinaryWriter,System.IO bw
return System.IO.BinaryWriter

tw protected_oe property

Helper instance for writing value types.
protected TypeIO,Sanguosha.Core.Utils tw
return TypeIO