protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
 {
     Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginClose);
     Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndClose);
     ICommunicationObject[] communicationObjectArray = new ICommunicationObject[] { this.innerChannelFactory };
     return(new Microsoft.ServiceBus.Channels.ChainedCloseAsyncResult(timeout, callback, state, chainedBeginHandler, chainedEndHandler, communicationObjectArray));
 }
 protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
 {
     Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginOpen);
     Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndOpen);
     ICommunicationObject[] channelAcceptor = new ICommunicationObject[] { this.ChannelAcceptor };
     return(new Microsoft.ServiceBus.Channels.ChainedOpenAsyncResult(timeout, callback, state, chainedBeginHandler, chainedEndHandler, channelAcceptor));
 }
 protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
 {
     Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.DummyBeginClose);
     Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.DummyEndClose);
     if (this.upgrade != null)
     {
         chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.upgrade.BeginClose);
         chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.upgrade.EndClose);
     }
     return(new Microsoft.ServiceBus.Common.ChainedAsyncResult(timeout, callback, state, chainedBeginHandler, chainedEndHandler, new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginClose), new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndClose)));
 }
예제 #4
0
 protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
 {
     Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.DummyBeginClose);
     Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.DummyEndClose);
     if (this.transportManagerContainer != null && !this.TransferTransportManagers())
     {
         chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.transportManagerContainer.BeginClose);
         chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.transportManagerContainer.EndClose);
     }
     return(new Microsoft.ServiceBus.Common.ChainedAsyncResult(timeout, callback, state, new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginClose), new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndClose), chainedBeginHandler, chainedEndHandler));
 }
        protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
        {
            StreamUpgradeProvider upgrade = this.Upgrade;

            if (upgrade == null)
            {
                return(base.OnBeginOpen(timeout, callback, state));
            }
            Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginOpen);
            Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndOpen);
            ICommunicationObject[] communicationObjectArray = new ICommunicationObject[] { upgrade };
            return(new Microsoft.ServiceBus.Channels.ChainedOpenAsyncResult(timeout, callback, state, chainedBeginHandler, chainedEndHandler, communicationObjectArray));
        }
        protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
        {
            IRelayedOnewayListener relayedOnewayListener = this.connection;

            if (relayedOnewayListener == null)
            {
                return(new DelegatingAsyncResult(new Func <TimeSpan, AsyncCallback, object, IAsyncResult>(this.OnBeginOpen), new Action <IAsyncResult>(this.OnEndOpen), timeout, callback, state));
            }
            Microsoft.ServiceBus.Common.ChainedBeginHandler chainedBeginHandler = new Microsoft.ServiceBus.Common.ChainedBeginHandler(this.OnBeginOpen);
            Microsoft.ServiceBus.Common.ChainedEndHandler   chainedEndHandler   = new Microsoft.ServiceBus.Common.ChainedEndHandler(this.OnEndOpen);
            IRelayedOnewayListener relayedOnewayListener1 = relayedOnewayListener;
            IRelayedOnewayListener relayedOnewayListener2 = relayedOnewayListener;

            return(new Microsoft.ServiceBus.Common.ChainedAsyncResult(timeout, callback, state, chainedBeginHandler, chainedEndHandler, new Microsoft.ServiceBus.Common.ChainedBeginHandler(relayedOnewayListener1.BeginOpen), new Microsoft.ServiceBus.Common.ChainedEndHandler(relayedOnewayListener2.EndOpen)));
        }