private bool GetUpgradeAndConnectionPool(out StreamUpgradeProvider upgradeCopy, out Microsoft.ServiceBus.Channels.ConnectionPool poolCopy)
        {
            bool flag;

            if (this.upgrade != null || this.connectionPool != null)
            {
                lock (base.ThisLock)
                {
                    if (this.upgrade != null || this.connectionPool != null)
                    {
                        upgradeCopy         = this.upgrade;
                        poolCopy            = this.connectionPool;
                        this.upgrade        = null;
                        this.connectionPool = null;
                        flag = true;
                    }
                    else
                    {
                        upgradeCopy = null;
                        poolCopy    = null;
                        return(false);
                    }
                }
                return(flag);
            }
            upgradeCopy = null;
            poolCopy    = null;
            return(false);
        }
예제 #2
0
 public StreamedFramingRequestChannel(ChannelManagerBase factory, Microsoft.ServiceBus.Channels.IConnectionOrientedTransportChannelFactorySettings settings, EndpointAddress remoteAddresss, Uri via, Microsoft.ServiceBus.Channels.IConnectionInitiator connectionInitiator, Microsoft.ServiceBus.Channels.ConnectionPool connectionPool) : base(factory, remoteAddresss, via, settings.ManualAddressing)
 {
     this.settings            = settings;
     this.connectionInitiator = connectionInitiator;
     this.connectionPool      = connectionPool;
     this.messageEncoder      = settings.MessageEncoderFactory.Encoder;
     this.upgrade             = settings.Upgrade;
     this.Activity            = new EventTraceActivity();
 }
 internal abstract void ReleaseConnectionPool(Microsoft.ServiceBus.Channels.ConnectionPool pool, TimeSpan timeout);
 protected override void OnOpening()
 {
     base.OnOpening();
     this.connectionPool = this.GetConnectionPool();
     Microsoft.ServiceBus.Diagnostics.DiagnosticUtility.DebugAssert(this.connectionPool != null, "ConnectionPool should always be found");
 }
예제 #5
0
 public ClientFramingDuplexSessionChannel(ChannelManagerBase factory, Microsoft.ServiceBus.Channels.IConnectionOrientedTransportChannelFactorySettings settings, EndpointAddress remoteAddresss, Uri via, Microsoft.ServiceBus.Channels.IConnectionInitiator connectionInitiator, Microsoft.ServiceBus.Channels.ConnectionPool connectionPool, bool exposeConnectionProperty) : base(factory, settings, remoteAddresss, via, exposeConnectionProperty)
 {
     this.settings             = settings;
     base.MessageEncoder       = settings.MessageEncoderFactory.CreateSessionEncoder();
     this.upgrade              = settings.Upgrade;
     this.connectionPoolHelper = new Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper(this, connectionPool, connectionInitiator);
 }
예제 #6
0
 public DuplexConnectionPoolHelper(Microsoft.ServiceBus.Channels.ClientFramingDuplexSessionChannel channel, Microsoft.ServiceBus.Channels.ConnectionPool connectionPool, Microsoft.ServiceBus.Channels.IConnectionInitiator connectionInitiator) : base(connectionPool, connectionInitiator, channel.Via)
 {
     this.channel  = channel;
     this.preamble = channel.CreatePreamble();
 }