Exemple #1
0
 public void Unsubscribe(IProxyEventSubscriber subscriber, ProxyEventType eventType)
 {
     lock (_Subscriptions)
     {
         if (_Subscriptions.Any(c => c.Item1 == subscriber && c.Item2 == eventType))
         {
             _Subscriptions.Remove(_Subscriptions.FirstOrDefault(c => c.Item1 == subscriber && c.Item2 == eventType));
         }
         UpdateSubscription();
     }
 }
Exemple #2
0
 public void Subscribe(IProxyEventSubscriber subscriber, ProxyEventType eventType)
 {
     lock (_Subscriptions)
     {
         if (!_Subscriptions.Any(c => c.Item1 == subscriber && c.Item2 == eventType))
         {
             _Subscriptions.Add(new Tuple <IProxyEventSubscriber, ProxyEventType>(subscriber, eventType));
         }
         UpdateSubscription();
     }
 }