예제 #1
0
        public IMethod GetMethod(string funcname, MethodParamList types)
        {
            if (funcname == ".ctor")
            {
                var con = TypeForSystem.GetConstructor(types.ToArraySystem());
                return(new Method_Common_System(this, con));
            }
            var method = TypeForSystem.GetMethod(funcname, types.ToArraySystem());

            return(new Method_Common_System(this, method));
        }
예제 #2
0
        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);
        }