public RemoteMethod(BaseRemote obj, MethodBase method, Type returnType, Type argType) { this.obj = obj; this.method = method; this.returnType = returnType; this.argType = argType; }
public static void RegisterRemote(BaseRemote remote, string name, RemoteNameFunc remoteNameFunc) { Dictionary <string, RemoteMethod> m = remote.getRemotesMap(); foreach (KeyValuePair <string, RemoteMethod> kvp in m) { var rn = remoteNameFunc(kvp.Key); var remoteName = String.Format("{0}.{1}", name, rn); if (remotesDict.ContainsKey(remoteName)) { throw new Exception(String.Format("tried to register same remote twice! remote name: {0}", remoteName)); } Logger.Info("registering remote {0}", remoteName); remotesDict[remoteName] = kvp.Value; } }
public static void RegisterRemote(BaseRemote remote, string name) { RegisterRemote(remote, name, Utils.DefaultRemoteNameFunc); }
public static void RegisterRemote(BaseRemote remote) { string className = remote.GetType().Name.ToLower(); RegisterRemote(remote, className, Utils.DefaultRemoteNameFunc); }