protected override ILConstruct EmitGetSerializerExpression(DynamicMethodEmittingContext context, Type targetType, SerializingMember?memberInfo) { return (memberInfo == null || !targetType.GetIsEnum() ? this.EmitInvokeMethodExpression( context, context.Context, Metadata._SerializationContext.GetSerializer1_Method.MakeGenericMethod(targetType) ) : this.EmitInvokeMethodExpression( context, context.Context, Metadata._SerializationContext.GetSerializer1_Parameter_Method.MakeGenericMethod(targetType), this.EmitBoxExpression( context, typeof(EnumSerializationMethod), this.EmitInvokeMethodExpression( context, null, Metadata._EnumMessagePackSerializerHelpers.DetermineEnumSerializationMethodMethod, context.Context, this.EmitTypeOfExpression(context, targetType), this.MakeEnumLiteral( context, typeof(EnumMemberSerializationMethod), memberInfo.Value.GetEnumMemberSerializationMethod() ) ) ) )); }
protected override ILConstruct EmitInvokeUnpackTo( DynamicMethodEmittingContext context, ILConstruct unpacker, ILConstruct collection ) { return this.EmitInvokeVoidMethod( context, this.EmitInvokeMethodExpression( context, context.Context, Metadata._SerializationContext.GetSerializer1_Method.MakeGenericMethod( typeof( TObject ) ) ), typeof( MessagePackSerializer<TObject> ).GetMethod( "UnpackTo" ), unpacker, collection ); }
protected override ILConstruct EmitThisReferenceExpression( DynamicMethodEmittingContext context ) { throw new NotSupportedException(); }