Descriptor for a method defined in another assembly/module
Inheritance: Method
Exemplo n.º 1
0
		/// <summary>
		/// Make a method reference descriptor for this method to be used 
		/// as a callsite signature for this vararg method
		/// </summary>
		/// <param name="optPars">the optional pars for the vararg method call</param>
		/// <returns></returns>
		public MethodRef MakeVarArgSignature(Type[] optPars) 
		{
			Type[] pars = new Type[numPars];
			MethodRef varArgSig;
			for (int i=0; i < numPars; i++) {
				pars[i] = parList[i].GetParType();
			}
			varArgSig = new MethodRef (this, name, ret_param.GetParType (), pars, true, optPars, 0);

			if (varArgSigList == null)
				varArgSigList = new ArrayList ();
			varArgSigList.Add (varArgSig);
			return varArgSig;
		}
Exemplo n.º 2
0
		/// <summary>
		/// Add a vararg method to this class
		/// </summary>
		/// <param name="name">method name</param>
		/// <param name="retType">return type</param>
		/// <param name="pars">parameter types</param>
		/// <param name="optPars">optional param types for this vararg method</param>
		/// <returns>a descriptor for this method</returns>
		public MethodRef AddVarArgMethod(string name, Type retType, 
				Type[] pars, Type[] optPars) {
			MethodRef meth = new MethodRef(this,name,retType,pars,true,optPars, 0);
			metaData.AddToTable(MDTable.MemberRef,meth);
			return meth;
		}
Exemplo n.º 3
0
 public MethodRef AddVarArgMethodToTypeSpec (Type item, string name, Type retType,
                 Type[] pars, Type[] optPars) {
         MethodRef meth = new MethodRef(item.GetTypeSpec (metaData), name,retType,pars,true,optPars);
         metaData.AddToTable(MDTable.MemberRef,meth);
         return meth;
 }
Exemplo n.º 4
0
		/// <summary>
		/// Add a "global" method in another module
		/// </summary>
		/// <param name="name">method name</param>
		/// <param name="retType">return type</param>
		/// <param name="pars">method parameter types</param>
		/// <returns>a descriptor for this method in anther module</returns>
		public MethodRef AddMethod(string name, Type retType, Type[] pars) 
		{
			MethodRef meth = new MethodRef(this,name,retType,pars,false,null, 0);
			metaData.AddToTable(MDTable.MemberRef,meth);
			return meth;
		}
Exemplo n.º 5
0
 public MethodRef AddMethodToTypeSpec (Type item, string name, Type retType, Type[] pars) {
         MethodRef meth = new MethodRef (item.GetTypeSpec (metaData), name, retType, pars, false, null);
         metaData.AddToTable (MDTable.MemberRef,meth);
         return meth;
 }