public MethodRef AddMethod(string name, GenericParam[] genPars, Type retType, Type[] pars) { MethodRef meth = AddMethod(name,retType,pars); if ((genPars != null) && (genPars.Length > 0)) { for (int i=0; i < genPars.Length; i++) { genPars[i].SetMethParam(meth,i); } meth.SetGenericParams(genPars); } return meth; }
internal static MethodRef AddStaticMethod(ClassRef classRef, string name, PERWAPI.Type retType, PERWAPI.Type[] args) { MethodRef method = classRef.GetMethod(name, args); if (method == null) method = classRef.AddMethod(name, retType, args); return method; }