/// <summary> /// Add a method to this class /// </summary> /// <param name="name">method name</param> /// <param name="genPars">generic parameters</param> /// <param name="retType">return type</param> /// <param name="pars">parameter types</param> /// <param name="optPars">optional parameter types</param> /// <returns>a descriptor for this method</returns> public MethodRef AddVarArgMethod(string name, GenericParam[] genPars, Type retType, Type[] pars, Type[] optPars) { MethodRef meth = AddMethod(name, genPars, retType, pars); meth.MakeVarArgMethod(null, optPars); return(meth); }
/// <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) { Contract.Requires(optPars != null); MethSig mSig = new MethSig(name); mSig.parTypes = sig.parTypes; mSig.retType = sig.retType; varArgSig = new MethodRef(sig); varArgSig.MakeVarArgMethod(this, optPars); return(varArgSig); }
/// <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) { Contract.Requires(optPars != null); MethSig mSig = new MethSig(name); mSig.parTypes = sig.parTypes; mSig.retType = sig.retType; varArgSig = new MethodRef(sig); varArgSig.MakeVarArgMethod(this, optPars); return varArgSig; }