private void Init(RPCCallObject o) { Token = o; Type type = o.GetType(); var methos = type.GetMethods(); foreach (var item in methos) { if (item.IsPublic) { string methodName = item.Name; var args = item.GetParameters(); Type[] typeArg = new Type[args.Length]; for (int i = 0; i < args.Length; i++) { typeArg[i] = args[i].ParameterType; } methodName = Make.MakeMethodName(methodName, typeArg); if (!MethodInfoDiy.ContainsKey(methodName)) { MethodInfoDiy.Add(methodName, new MethodModuleDef(item)); } } } }
private void Init(RPCCallObject o) { Token = o; Type type = o.GetType(); string tag = Make.GetTypeTag(type); if (!string.IsNullOrEmpty(tag)) { ModuleName = tag; } var methos = type.GetMethods(); foreach (var item in methos) { string _methosName; if (item.IsPublic) { string methodName = item.Name; if (Make.IsCallMethod(item, out _methosName)) { if (!string.IsNullOrEmpty(_methosName)) { methodName = _methosName; } } var args = item.GetParameters(); Type[] typeArg = new Type[args.Length]; for (int i = 0; i < args.Length; i++) { typeArg[i] = args[i].ParameterType; } methodName = Make.MakeMethodName(methodName, typeArg); if (!MethodInfoDiy.ContainsKey(methodName)) { MethodInfoDiy.Add(methodName, new MethodModuleDef(item)); } } } }
public void Init(object o) { Token = o; Type type = o.GetType(); var methos = type.GetMethods(); foreach (var item in methos) { string methodName = item.Name; var args = item.GetParameters(); Type[] typeArg = new Type[args.Length]; for (int i = 0; i < args.Length; i++) { typeArg[i] = args[i].ParameterType; } methodName = MakeID.MakeMethodName(methodName, typeArg); MethodInfoDiy.Add(methodName, new MethodModuleDef(item)); } }