C# Class MsgPack.Serialization.EmittingSerializers.SerializerEmitter

Mostrar archivo Open project: msgpack/msgpack-cli Class Usage Examples

Public Methods

Method Description
CreateEnumConstructor ( ) : Func

Creates instance constructor delegates.

CreateEnumInstance ( SerializationContext context, EnumSerializationMethod serializationMethod ) : MessagePackSerializer

Creates the serializer type built now and returns its new instance.

DefineOverrideMethod ( string methodName ) : ILMethodConctext

Gets the IL generator to implement specified method override.

DefinePrivateMethod ( string methodName, bool isStatic, Type returnType ) : ILMethodConctext

Gets the IL generator to implement specified private instance method.

RegisterField ( string name, Type type ) : FieldBuilder

Regisgters specified field to the current emitting session.

SerializerEmitter ( ModuleBuilder host, SerializerSpecification specification, Type baseClass, bool isDebuggable ) : System

Initializes a new instance of the SerializerEmitter class.

SerializerEmitter ( SerializationContext context, ModuleBuilder host, SerializerSpecification specification, bool isDebuggable ) : System

Initializes a new instance of the SerializerEmitter class for enum.

Private Methods

Method Description
CreateConstructor ( MethodAttributes attributes, Type parameterTypes, TracingILGenerator>.Action emitter ) : ConstructorBuilder
DefineConstructor ( MethodAttributes attributes ) : ConstructorBuilder
DefineInitonlyField ( string name, Type type ) : FieldBuilder
DefineMethod ( string methodName, bool isOverride, bool isStatic, Type returnType, Type parameterTypes ) : ILMethodConctext
EmitDefaultEnumConstructor ( ConstructorBuilder methodConstructor, TracingILGenerator il ) : void
EmitMethodEnumConstructor ( Type baseType, TracingILGenerator il ) : void
GetILGenerator ( ConstructorBuilder builder, Type parameterTypes ) : TracingILGenerator
GetILGenerator ( MethodBuilder builder, Type parameterTypes ) : TracingILGenerator

Method Details

CreateEnumConstructor() public method

Creates instance constructor delegates.
public CreateEnumConstructor ( ) : Func
return Func

CreateEnumInstance() public method

Creates the serializer type built now and returns its new instance.
public CreateEnumInstance ( SerializationContext context, EnumSerializationMethod serializationMethod ) : MessagePackSerializer
context SerializationContext The to holds serializers.
serializationMethod EnumSerializationMethod The which determines serialization form of the enums.
return MessagePackSerializer

DefineOverrideMethod() public method

Gets the IL generator to implement specified method override.
public DefineOverrideMethod ( string methodName ) : ILMethodConctext
methodName string The name of the method.
return ILMethodConctext

DefinePrivateMethod() public method

Gets the IL generator to implement specified private instance method.
public DefinePrivateMethod ( string methodName, bool isStatic, Type returnType ) : ILMethodConctext
methodName string The name of the method.
isStatic bool true for static method.
returnType System.Type The type of the method return value.
return ILMethodConctext

RegisterField() public method

Regisgters specified field to the current emitting session.
public RegisterField ( string name, Type type ) : FieldBuilder
name string The name of the field.
type System.Type The type of the field.
return System.Reflection.Emit.FieldBuilder

SerializerEmitter() public method

Initializes a new instance of the SerializerEmitter class.
public SerializerEmitter ( ModuleBuilder host, SerializerSpecification specification, Type baseClass, bool isDebuggable ) : System
host System.Reflection.Emit.ModuleBuilder The host .
specification SerializerSpecification The specification of the serializer.
baseClass System.Type Type of the base class of the serializer.
isDebuggable bool Set to true when is debuggable.
return System

SerializerEmitter() public method

Initializes a new instance of the SerializerEmitter class for enum.
public SerializerEmitter ( SerializationContext context, ModuleBuilder host, SerializerSpecification specification, bool isDebuggable ) : System
context SerializationContext A .
host System.Reflection.Emit.ModuleBuilder The host .
specification SerializerSpecification The specification of the serializer.
isDebuggable bool Set to true when is debuggable.
return System