예제 #1
0
        private ReflectedMethodInfo CreateMethodInfo(ScriptEngine.Machine.MethodInfo methInfo)
        {
            var reflectedMethod = new ReflectedMethodInfo(methInfo.Name);

            reflectedMethod.IsFunction = methInfo.IsFunction;
            for (int i = 0; i < methInfo.Params.Length; i++)
            {
                var currentParam   = methInfo.Params[i];
                var reflectedParam = new ReflectedParamInfo("param" + i.ToString(), currentParam.IsByValue);
                reflectedParam.SetOwner(reflectedMethod);
                reflectedParam.SetPosition(i);
                reflectedMethod.Parameters.Add(reflectedParam);
            }

            return(reflectedMethod);
        }
예제 #2
0
        private ReflectedMethodInfo CreateMethodInfo(ExportedSymbol engineMethod)
        {
            var methInfo        = _module.Methods[engineMethod.Index].Signature;
            var reflectedMethod = new ReflectedMethodInfo(methInfo.Name);

            reflectedMethod.SetDispId(engineMethod.Index);
            reflectedMethod.IsFunction = methInfo.IsFunction;
            for (int i = 0; i < methInfo.Params.Length; i++)
            {
                var currentParam   = methInfo.Params[i];
                var reflectedParam = new ReflectedParamInfo("param" + i.ToString(), currentParam.IsByValue);
                reflectedParam.SetOwner(reflectedMethod);
                reflectedParam.SetPosition(i);
                reflectedMethod.Parameters.Add(reflectedParam);
            }

            return(reflectedMethod);
        }
예제 #3
0
        private ReflectedMethodInfo CreateMethodInfo(ExportedSymbol engineMethod)
        {
            var methInfo = _module.Methods[engineMethod.Index].Signature;
            var reflectedMethod = new ReflectedMethodInfo(methInfo.Name);
            reflectedMethod.SetDispId(engineMethod.Index);
            reflectedMethod.IsFunction = methInfo.IsFunction;
            for (int i = 0; i < methInfo.Params.Length; i++)
            {
                var currentParam = methInfo.Params[i];
                var reflectedParam = new ReflectedParamInfo("param" + i.ToString(), currentParam.IsByValue);
                reflectedParam.SetOwner(reflectedMethod);
                reflectedParam.SetPosition(i);
                reflectedMethod.Parameters.Add(reflectedParam);
            }

            return reflectedMethod;

        }