public virtual IMethod GetMethod(string funcname, MethodParamList types) { bool flag = funcname == ".ctor"; IMethod result; if (flag) { ConstructorInfo constructor = this.TypeForSystem.GetConstructor(types.ToArraySystem()); result = new Method_Common_System(this, constructor); } else { MethodInfo method = this.TypeForSystem.GetMethod(funcname, types.ToArraySystem()); result = new Method_Common_System(this, method); } return(result); }
public virtual IMethod GetMethod(string funcname, MethodParamList types) { if (funcname == ".ctor") { var con = TypeForSystem.GetConstructor(types.ToArraySystem()); return(new Method_Common_System(this, con)); } else if (funcname == "Get" && TypeForSystem == typeof(int[, ]) && types.Count == 2 && types[0].TypeForSystem == typeof(int) && types[1].TypeForSystem == typeof(int)) { return(new Method_Common_System(this, typeof(CustomMethod).GetMethod("GetTwoDimesionArray"))); } var method = TypeForSystem.GetMethod(funcname, types.ToArraySystem()); var ret = new Method_Common_System(this, method); Func <object, object[], object> fastCall; if (FastCalls.TryGetValue(method, out fastCall)) { ret.SetFastCall(fastCall); } return(ret); }