对于netcoreapp1.0,是否有.net框架EmitCalli的替代方案
if (IntPtr.Size == 4)
il.Emit(OpCodes.Ldc_I4, ptr.ToInt32());
else if (IntPtr.Size == 8)
il.Emit(OpCodes.Ldc_I8, ptr.ToInt64());
il.EmitCalli(OpCodes.Calli, CallingConvention.Cdecl, returnType, paramTypes);
这个库是否包含您想要的内容?
https://www.nuget.org/packages/System.Reflection.Emit.ILGeneration/
它包含System.Reflection.Emit.ILGenerator类型,包括函数
EmitCalli(OpCode opcode, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes)
EmitCalli将在.NET Core 2.1.0-preview 2中提供