Esempio n. 1
0
        public EMethod Execute(MethodInfo info, object[] instances)
        {
            ILGenerator il = ThreadCache.GetIL();

            if (instances != null)
            {
                for (int i = 0; i < instances.Length; i++)
                {
                    if (instances[i] != null)
                    {
                        il.NoErrorLoad(instances[i]);
                    }
                }
            }
            MethodHelper.CallMethod(info);
            if (info.ReturnType != null)
            {
                EMethod newMethod = info.ReturnType;
                return(newMethod);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public void SProperty(string propertyName, object value)
        {
            PropertyInfo info = Struction.Properties[propertyName];
            MethodInfo method = info.GetSetMethod(true);

            //静态属性
            if (!method.IsStatic)
            {
                This();
            }

            il.NoErrorLoad(value);

            MethodHelper.CallMethod(method);
        }
Esempio n. 3
0
        public EMethod Execute(MethodInfo info, Action action = null)
        {
            ILGenerator il = ThreadCache.GetIL();

            if (action != null)
            {
                action();
            }
            MethodHelper.CallMethod(info);
            if (info.ReturnType != null)
            {
                EMethod newMethod = info.ReturnType;
                return(newMethod);
            }
            else
            {
                return(null);
            }
        }