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;
		}
Пример #2
0
 public void Emit(OpCode opcode, SignatureHelper signature)
 {
     Emit(opcode);
     UpdateStack(opcode, signature.HasThis, signature.ReturnType, signature.ParameterCount);
     code.Write(moduleBuilder.GetSignatureToken(signature).Token);
 }
Пример #3
0
 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))));
 }
Пример #4
0
 public SignatureToken GetSignatureToken(SignatureHelper sigHelper)
 {
     return(new SignatureToken(this.StandAloneSig.FindOrAddRecord(this.Blobs.Add(sigHelper.GetSignature(this))) | (StandAloneSigTable.Index << 24)));
 }
Пример #5
0
		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);
		}
Пример #6
0
		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;
		}
Пример #7
0
		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;
		}
Пример #8
0
		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;
		}
Пример #9
0
		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;
		}
Пример #10
0
		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;
		}