Example #1
0
            public EstablishConnectionAsyncResult(ConnectionPoolHelper parent,
                                                  TimeSpan timeout, AsyncCallback callback, object state)
                : base(callback, state)
            {
                this.parent        = parent;
                this.timeoutHelper = new TimeoutHelper(timeout);

                bool success      = false;
                bool completeSelf = false;

                try
                {
                    completeSelf = Begin();
                    success      = true;
                }
                finally
                {
                    if (!success)
                    {
                        Cleanup();
                    }
                }

                if (completeSelf)
                {
                    Cleanup();
                    base.Complete(true);
                }
            }
Example #2
0
            public EstablishConnectionAsyncResult(ConnectionPoolHelper parent, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
            {
                this.parent        = parent;
                this.timeoutHelper = new TimeoutHelper(timeout);
                bool flag  = false;
                bool flag2 = false;

                try
                {
                    flag2 = this.Begin();
                    flag  = true;
                }
                finally
                {
                    if (!flag)
                    {
                        this.Cleanup();
                    }
                }
                if (flag2)
                {
                    this.Cleanup();
                    base.Complete(true);
                }
            }
Example #3
0
 public ClientFramingDuplexSessionChannel(ChannelManagerBase factory, IConnectionOrientedTransportChannelFactorySettings settings, EndpointAddress remoteAddresss, Uri via, IConnectionInitiator connectionInitiator, ConnectionPool connectionPool, bool exposeConnectionProperty, bool flowIdentity) : base(factory, settings, remoteAddresss, via, exposeConnectionProperty)
 {
     this.settings             = settings;
     base.MessageEncoder       = settings.MessageEncoderFactory.CreateSessionEncoder();
     this.upgrade              = settings.Upgrade;
     this.flowIdentity         = flowIdentity;
     this.connectionPoolHelper = new DuplexConnectionPoolHelper(this, connectionPool, connectionInitiator);
 }
 public EstablishConnectionAsyncResult(ConnectionPoolHelper parent, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
 {
     this.parent = parent;
     this.timeoutHelper = new TimeoutHelper(timeout);
     bool flag = false;
     bool flag2 = false;
     try
     {
         flag2 = this.Begin();
         flag = true;
     }
     finally
     {
         if (!flag)
         {
             this.Cleanup();
         }
     }
     if (flag2)
     {
         this.Cleanup();
         base.Complete(true);
     }
 }