Exemple #1
0
 public AcceptChannelAsyncResult(ServiceBusInputSessionChannelListener owner, TimeSpan retryTimeSpan, TimeSpan timeout, AsyncCallback callback, object state) : base(timeout, callback, state)
 {
     this.owner         = owner;
     this.retryTimeSpan = retryTimeSpan;
     this.acceptMessageSessionTimeout = (base.OriginalTimeout == TimeSpan.MaxValue ? this.owner.DefaultReceiveTimeout : timeout);
     this.Channel = null;
 }
Exemple #2
0
 public void IncrementRetryTimeSpan(TimeSpan currentRetryTimeSpan)
 {
     if (currentRetryTimeSpan == this.retryTimeSpan && this.retryTimeSpan < ServiceBusInputSessionChannelListener.MaxRetrySleepTime)
     {
         lock (this.retryTimeoutLock)
         {
             if (currentRetryTimeSpan == this.retryTimeSpan && this.retryTimeSpan < ServiceBusInputSessionChannelListener.MaxRetrySleepTime)
             {
                 ServiceBusInputSessionChannelListener serviceBusInputSessionChannelListener = this;
                 serviceBusInputSessionChannelListener.retryTimeSpan = serviceBusInputSessionChannelListener.retryTimeSpan + this.retryTimeSpan;
                 if (this.retryTimeSpan > ServiceBusInputSessionChannelListener.MaxRetrySleepTime)
                 {
                     this.retryTimeSpan = ServiceBusInputSessionChannelListener.MaxRetrySleepTime;
                 }
             }
         }
     }
 }