C# Class MsgPack.Serialization.EmittingSerializers.SerializerEmitter

Afficher le fichier Open project: msgpack/msgpack-cli Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Creates instance constructor delegates.
public CreateEnumConstructor ( ) : Func
Résultat Func

CreateEnumInstance() public méthode

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.
Résultat MessagePackSerializer

DefineOverrideMethod() public méthode

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

DefinePrivateMethod() public méthode

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.
Résultat ILMethodConctext

RegisterField() public méthode

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.
Résultat System.Reflection.Emit.FieldBuilder

SerializerEmitter() public méthode

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.
Résultat System

SerializerEmitter() public méthode

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.
Résultat System