public bool UnSubscribeToQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     if (observer == null)
     {
         throw new ArgumentNullException("observer");
     }
     lock (queueBalanceListeners)
     {
         return(queueBalanceListeners.Contains(observer) && queueBalanceListeners.Remove(observer));
     }
 }
Beispiel #2
0
 /// <inheritdoc/>
 public bool UnSubscribeFromQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     if (observer == null)
     {
         throw new ArgumentNullException(nameof(observer));
     }
     lock (this.queueBalanceListeners)
     {
         return(this.queueBalanceListeners.Remove(observer));
     }
 }
 public bool UnSubscribeToQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     if (observer == null)
     {
         throw new ArgumentNullException("observer");
     }
     lock (queueBalanceListeners)
     {
         return queueBalanceListeners.Contains(observer) && queueBalanceListeners.Remove(observer);
     }
 }
 public bool SubscribeToQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     if (observer == null)
     {
         throw new ArgumentNullException("observer");
     }
     lock (queueBalanceListeners)
     {
         if (queueBalanceListeners.Contains(observer)) return false;
         
         queueBalanceListeners.Add(observer);
         return true;
     }
 }
Beispiel #5
0
 /// <inheritdoc/>
 public bool SubscribeToQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     if (observer == null)
     {
         throw new ArgumentNullException(nameof(observer));
     }
     lock (this.queueBalanceListeners)
     {
         if (this.queueBalanceListeners.Contains(observer))
         {
             return(false);
         }
         this.queueBalanceListeners.Add(observer);
         return(true);
     }
 }
Beispiel #6
0
 public bool UnSubscribeFromQueueDistributionChangeEvents(IStreamQueueBalanceListener observer)
 {
     //no op operation
     return(true);
 }