C# Class ICSharpCode.NRefactory.Utils.FastSerializer

Show file Open project: 0xd4d/NRefactory Class Usage Examples

Public Methods

Method Description
Deserialize ( BinaryReader reader ) : object
Deserialize ( Stream stream ) : object
EmitReadField ( ILGenerator il, LocalBuilder reader, LocalBuilder instance, FieldInfo field ) : void
EmitReadValueType ( ILGenerator il, LocalBuilder reader, Type valType ) : void

Stack transition: ..., field-ref => ...

EmitScanField ( ILGenerator il, LocalBuilder instance, FieldInfo field ) : void

Emit 'scan instance.Field'. Stack transition: ... => ...

EmitScanValueType ( ILGenerator il, Type valType ) : void

Stack transition: ..., value => ...

EmitWriteField ( ILGenerator il, LocalBuilder writer, LocalBuilder instance, FieldInfo field ) : void

Emit 'write instance.Field'. Stack transition: ... => ...

EmitWriteValueType ( ILGenerator il, LocalBuilder writer, Type valType ) : void

Stack transition: ..., value => ...

ReadPrimitiveValue ( ILGenerator il, LocalBuilder reader, Type fieldType ) : void

Reads a primitive value of the specified type. Stack transition: ... => ..., value

Serialize ( BinaryWriter writer, object instance ) : void
Serialize ( Stream stream, object instance ) : void
WritePrimitiveValue ( ILGenerator il, Type fieldType ) : void

Writes a primitive value of the specified type. Stack transition: ..., writer, value => ...

Private Methods

Method Description
CreateCustomDeserializationAction ( Type type ) : CustomDeserializationAction
CreateReader ( Type type ) : ObjectReader
CreateScanner ( Type type ) : ObjectScanner
CreateWriter ( Type type ) : ObjectWriter
GetCustomDeserializationAction ( Type type ) : CustomDeserializationAction
GetReader ( Type type ) : ObjectReader
GetScanner ( Type type ) : ObjectScanner
GetSerializableFields ( Type type ) : List
GetWriter ( Type type ) : ObjectWriter
IsReferenceOrContainsReferences ( Type type ) : bool
Log ( string format ) : void

Method Details

Deserialize() public method

public Deserialize ( BinaryReader reader ) : object
reader System.IO.BinaryReader
return object

Deserialize() public method

public Deserialize ( Stream stream ) : object
stream Stream
return object

EmitReadField() public method

public EmitReadField ( ILGenerator il, LocalBuilder reader, LocalBuilder instance, FieldInfo field ) : void
il System.Reflection.Emit.ILGenerator
reader System.Reflection.Emit.LocalBuilder
instance System.Reflection.Emit.LocalBuilder
field System.Reflection.FieldInfo
return void

EmitReadValueType() public method

Stack transition: ..., field-ref => ...
public EmitReadValueType ( ILGenerator il, LocalBuilder reader, Type valType ) : void
il System.Reflection.Emit.ILGenerator
reader System.Reflection.Emit.LocalBuilder
valType System.Type
return void

EmitScanField() public method

Emit 'scan instance.Field'. Stack transition: ... => ...
public EmitScanField ( ILGenerator il, LocalBuilder instance, FieldInfo field ) : void
il System.Reflection.Emit.ILGenerator
instance System.Reflection.Emit.LocalBuilder
field System.Reflection.FieldInfo
return void

EmitScanValueType() public method

Stack transition: ..., value => ...
public EmitScanValueType ( ILGenerator il, Type valType ) : void
il System.Reflection.Emit.ILGenerator
valType System.Type
return void

EmitWriteField() public method

Emit 'write instance.Field'. Stack transition: ... => ...
public EmitWriteField ( ILGenerator il, LocalBuilder writer, LocalBuilder instance, FieldInfo field ) : void
il System.Reflection.Emit.ILGenerator
writer System.Reflection.Emit.LocalBuilder
instance System.Reflection.Emit.LocalBuilder
field System.Reflection.FieldInfo
return void

EmitWriteValueType() public method

Stack transition: ..., value => ...
public EmitWriteValueType ( ILGenerator il, LocalBuilder writer, Type valType ) : void
il System.Reflection.Emit.ILGenerator
writer System.Reflection.Emit.LocalBuilder
valType System.Type
return void

ReadPrimitiveValue() public method

Reads a primitive value of the specified type. Stack transition: ... => ..., value
public ReadPrimitiveValue ( ILGenerator il, LocalBuilder reader, Type fieldType ) : void
il System.Reflection.Emit.ILGenerator
reader System.Reflection.Emit.LocalBuilder
fieldType System.Type
return void

Serialize() public method

public Serialize ( BinaryWriter writer, object instance ) : void
writer System.IO.BinaryWriter
instance object
return void

Serialize() public method

public Serialize ( Stream stream, object instance ) : void
stream Stream
instance object
return void

WritePrimitiveValue() public method

Writes a primitive value of the specified type. Stack transition: ..., writer, value => ...
public WritePrimitiveValue ( ILGenerator il, Type fieldType ) : void
il System.Reflection.Emit.ILGenerator
fieldType System.Type
return void