public void Disconnect(Gateway gw)
        {
            lock (m_gateways)
            {
                object key = gw.PortDefinition.UniqueId;

                if (gw == m_gateways[key])
                {
                    m_gateways.Remove(key);
                }
            }
        }
Пример #2
0
        //--//
        
        internal GatewayStub( Gateway parent, GatewayProxy owner )
        {
            m_parent    = parent;
            m_owner     = owner;

            m_requests  = Hashtable.Synchronized( new Hashtable() );

            owner.SetParent( this );
        }
        public GatewayStub Connect(_DBG.PortDefinition pd, GatewayProxy gwp)
        {
            lock (m_gateways)
            {
                object key = pd.UniqueId;
                Gateway gw = null;

                if (m_gateways.ContainsKey(key))
                {
                    gw = m_gateways[key];
                }
                else
                {
                    gw = new Gateway(this, pd);

                    ((_WP.IController)gw).Start();

                    m_gateways[key] = gw;
                }

                return new GatewayStub(gw, gwp);
            }
        }