/// <summary> /// 根据操作类型确定调用动态方法的名称 /// </summary> /// <param name="type"></param> /// <param name="operateType"></param> /// <returns></returns> public static string GetMethodName(Type type, SynOperationType operateType) { MethodInfo[] methods = DynamicInvoke.GetMethods(type); if (methods != null && methods.Length > 0) { foreach (var method in methods) { if (method != null) { if (method.Name.ToUpper().Contains(operateType.ToString().ToUpper())) { return(method.Name); } } } } return(null); }