Example #1
0
 public int AddProxyedObject(object o, string name)
 {
     foreach (ProxyHolder proxyHolder in _proxys)
     {
         if (proxyHolder.ProxyedObject == o && proxyHolder.Name == name)
             return proxyHolder.ObjectID;
     }
     ProxyHolder p = new ProxyHolder(name, o);
     this._proxys.Add(p);
     return p.ObjectID;
 }
        public int AddProxyedObject(object o, string name)
        {
            foreach (ProxyHolder proxyHolder in _proxys)
            {
                if (proxyHolder.ProxyedObject == o && proxyHolder.Name == name)
                    return proxyHolder.ObjectID;
            }
            ProxyHolder p = new ProxyHolder(name, o);
            this._proxys.Add(p);

            foreach (RPCBase rpcBase in _clients)
            {
                (rpcBase as RPCServer).AddProxyedObject( p.ProxyedObject, p.Name);
            }

            return p.ObjectID;
        }