public static SignatureHelper GetPropertySigHelper(Module mod, Type returnType, Type[] parameterTypes) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, Signature.PROPERTY); sig.returnType = returnType; foreach (Type type in parameterTypes) { sig.AddArgument(type); } return sig; }
public void Emit(OpCode opcode, SignatureHelper signature) { Emit(opcode); UpdateStack(opcode, signature.HasThis, signature.ReturnType, signature.ParameterCount); code.Write(moduleBuilder.GetSignatureToken(signature).Token); }
public void Emit(OpCode opcode, SignatureHelper signature) { Emit(opcode); UpdateStack(opcode, signature.HasThis, signature.ReturnType, signature.ParameterCount); code.Write(0x11000000 | moduleBuilder.StandAloneSig.FindOrAddRecord(moduleBuilder.Blobs.Add(signature.GetSignature(moduleBuilder)))); }
public SignatureToken GetSignatureToken(SignatureHelper sigHelper) { return(new SignatureToken(this.StandAloneSig.FindOrAddRecord(this.Blobs.Add(sigHelper.GetSignature(this))) | (StandAloneSigTable.Index << 24))); }
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 GetPropertySigHelper(Module mod, Type returnType, Type[] parameterTypes) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, Signature.PROPERTY); sig.returnType = returnType; sig.returnTypeOptionalCustomModifiers = Type.EmptyTypes; sig.returnTypeRequiredCustomModifiers = Type.EmptyTypes; foreach (Type type in parameterTypes) { sig.AddArgument(type); } return sig; }
public static SignatureHelper GetMethodSigHelper(Module mod, Type returnType, Type[] parameterTypes) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, 0); sig.returnType = returnType; sig.callingConvention = CallingConventions.Standard; foreach (Type type in parameterTypes) { sig.AddArgument(type); } return sig; }
public static SignatureHelper GetMethodSigHelper(Module mod, CallingConventions callingConvention, Type returnType) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, 0); sig.returnType = returnType; sig.callingConvention = callingConvention; return sig; }
public static SignatureHelper GetMethodSigHelper(Module mod, CallingConvention unmanagedCallConv, Type returnType) { SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, 0); sig.returnType = returnType; sig.unmanaged = true; sig.unmanagedCallConv = unmanagedCallConv; 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; }