PERWAPI.MethodRef.MakeVarArgMethod C# (CSharp) Method

MakeVarArgMethod() public method

public MakeVarArgMethod ( MethodDef paren, Type optPars ) : void
paren MethodDef
optPars Type
return void
        public void MakeVarArgMethod(MethodDef paren, Type[] optPars)
        {
            if (paren != null) {
                parent = null;
                varArgParent = paren;
            }
            sig.optParTypes = optPars;
            if (sig.optParTypes != null) sig.numOptPars = (uint)sig.optParTypes.Length;
            sig.callConv = CallConv.Vararg;
        }

Usage Example

示例#1
0
文件: PERWAPI.cs 项目: nomit007/f4
 /// <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)
 {
     MethSig mSig = new MethSig(name);
     mSig.parTypes = sig.parTypes;
     mSig.retType = sig.retType;
     varArgSig = new MethodRef(sig);
     varArgSig.MakeVarArgMethod(this,optPars);
     return varArgSig;
 }