public Func<SerializationContext, EnumSerializationMethod, MessagePackSerializer> CreateEnumConstructor()
{
var methodConstructor =
this.CreateConstructor(
MethodAttributes.Public,
ContextAndEnumSerializationMethodConstructorParameterTypes,
this.EmitMethodEnumConstructor
);
this.CreateConstructor(
MethodAttributes.Public,
ContextConstructorParameterTypes,
( _, il ) => this.EmitDefaultEnumConstructor( methodConstructor, il )
);
var ctor =
this._typeBuilder
#if !NETSTANDARD1_1 && !NETSTANDARD1_3
.CreateType()
#else
.CreateTypeInfo().AsType()
#endif // !NETSTANDARD1_1 && !NETSTANDARD1_3
.GetRuntimeConstructor( ContextAndEnumSerializationMethodConstructorParameterTypes );
#if DEBUG
Contract.Assert( ctor != null, "ctor != null" );
#endif
return ctor.CreateConstructorDelegate<Func<SerializationContext, EnumSerializationMethod, MessagePackSerializer>>();
}