Ejemplo n.º 1
0
        //--//

        internal GatewayStub(Gateway parent, GatewayProxy owner)
        {
            m_parent = parent;
            m_owner  = owner;

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

            owner.SetParent(this);
        }
        /// <include file='doc\ConnectionManager.uex' path='docs/doc[@for="Manager.Connect"]/*' />
        public _DBG.Engine Connect(_DBG.PortDefinition pd)
        {
            _DBG.Engine eng = new _DBG.Engine();

            GatewayProxy gwp = new GatewayProxy();
            GatewayStub  gws = m_mgr.Connect(pd, gwp);

            gwp.SetOwner(eng);

            eng.SetController(gwp);

            return(eng);
        }
        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));
            }
        }
Ejemplo n.º 4
0
        //--//
        
        internal GatewayStub( Gateway parent, GatewayProxy owner )
        {
            m_parent    = parent;
            m_owner     = owner;

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

            owner.SetParent( this );
        }
        /// <include file='doc\ConnectionManager.uex' path='docs/doc[@for="Manager.Connect"]/*' />
        public _DBG.Engine Connect( _DBG.PortDefinition pd )
        {
            _DBG.Engine eng = new _DBG.Engine(); 

            GatewayProxy gwp = new GatewayProxy();
            GatewayStub gws = m_mgr.Connect( pd, gwp );                        
            
            gwp.SetOwner( eng );

            eng.SetController( gwp );
            
            return eng;            
        }                
        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);
            }
        }