private void OnNewChannelNeeded(object sender, EventArgs args)
 {
     if (!base.IsDisposed && CommunicationState.Opened == base.State)
     {
         IInputChannel serviceBusInputChannel = new ServiceBusInputChannel(this);
         serviceBusInputChannel.SafeAddClosed(new EventHandler(this.OnNewChannelNeeded));
         this.singletonAcceptor.EnqueueAndDispatch(serviceBusInputChannel);
     }
 }
Exemple #2
0
 public CreateAndOpenMessageReceiverAsyncResult(ServiceBusInputChannel inputChannel, TimeSpan timeout, AsyncCallback callback, object state) : base(timeout, callback, state)
 {
     this.inputChannel     = inputChannel;
     this.channelListener  = inputChannel.ChannelListener;
     this.messagingFactory = this.channelListener.MessagingFactory;
     this.entityName       = this.channelListener.MessagingAddress.EntityName;
     this.receiveMode      = this.channelListener.ReceiveMode;
     this.prefetchCount    = this.channelListener.PrefetchCount;
 }