Example #1
0
 public void Unsubscribe(ListenerSubscription listenerSubscription)
 {
     lock (_lock)
     {
         _subscriptions.Remove(listenerSubscription);
     }
 }
Example #2
0
        public ListenerSubscription Subscribe(string counterName, long expectedValue)
        {
            var subscription = new ListenerSubscription(this, counterName, expectedValue);

            lock (_lock)
            {
                _subscriptions.Add(subscription);
            }

            return(subscription);
        }