public RemoteMethod(BaseRemote obj, MethodBase method, Type returnType, Type argType)
 {
     this.obj        = obj;
     this.method     = method;
     this.returnType = returnType;
     this.argType    = argType;
 }
Example #2
0
        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;
            }
        }
Example #3
0
 public static void RegisterRemote(BaseRemote remote, string name)
 {
     RegisterRemote(remote, name, Utils.DefaultRemoteNameFunc);
 }
Example #4
0
        public static void RegisterRemote(BaseRemote remote)
        {
            string className = remote.GetType().Name.ToLower();

            RegisterRemote(remote, className, Utils.DefaultRemoteNameFunc);
        }