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); } }
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); }
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); } }