public void EmitCalli(OpCode opc, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes) { SignatureHelper sig = SignatureHelper.GetMethodSigHelper(moduleBuilder, callingConvention, returnType); sig.AddArguments(parameterTypes, null, null); if (optionalParameterTypes != null && optionalParameterTypes.Length != 0) { sig.AddSentinel(); sig.AddArguments(optionalParameterTypes, null, null); } Emit(opc, sig); }
public void EmitCalli(OpCode opc, CallingConvention callingConvention, Type returnType, Type[] parameterTypes) { SignatureHelper sig = SignatureHelper.GetMethodSigHelper(moduleBuilder, callingConvention, returnType); sig.AddArguments(parameterTypes, null, null); Emit(opc, sig); }
public static SignatureHelper GetMethodSigHelper(Module mod, Type returnType, Type[] parameterTypes) { SignatureHelper sig = Create(mod, 0, returnType); sig.AddArgument(returnType); sig.paramCount = 0; sig.AddArguments(parameterTypes, null, null); return(sig); }
public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, Signature.PROPERTY); sig.callingConvention = callingConvention; sig.returnType = returnType; sig.returnTypeCustomModifiers = CustomModifiers.FromReqOpt(requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers); sig.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers); return(sig); }
public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers) { byte type = Signature.PROPERTY; if ((callingConvention & CallingConventions.HasThis) != 0) { type |= Signature.HASTHIS; } SignatureHelper sig = Create(mod, type, returnType); sig.AddArgument(returnType, requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers); sig.paramCount = 0; sig.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers); return(sig); }
public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, Signature.PROPERTY); sig.callingConvention = callingConvention; sig.returnType = returnType; sig.returnTypeOptionalCustomModifiers = requiredReturnTypeCustomModifiers; sig.returnTypeRequiredCustomModifiers = optionalReturnTypeCustomModifiers; sig.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers); return sig; }