//调用一次的方法 public object InvokeOne(string typeFullName, string methodName, object instance, params object[] args) { if (instance != null) { #if ILRuntime if (ILAppDomain != null) { return(ILAppDomain.Invoke(typeFullName, methodName, instance, args)); } #else if (ReflectAssembly != null) { Type type = ReflectAssembly.GetType(typeFullName); return(type.GetMethod(methodName).Invoke(instance, args)); } #endif } return(null); }