Ejemplo n.º 1
0
 public void CancelSubscriMessage(string clientId, ClonableConsumeEventHandler eventConsume)
 {
     if (eventConsume != null)
     {
         if (this.messagesNotifyEvent != null)
         {
             if (this.messagesNotifyEvent[clientId].GetInvocationList().Contains(eventConsume))
             {
                 this.messagesNotifyEvent[clientId] -= eventConsume;
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void SubscrMessage(string clientId, ClonableConsumeEventHandler eventConsume)
 {
     if (eventConsume != null)
     {
         if (this.messagesNotifyEvent != null)
         {
             if (!this.messagesNotifyEvent[clientId].GetInvocationList().Contains(eventConsume))
             {
                 this.messagesNotifyEvent[clientId] += eventConsume;
             }
         }
         else
         {
             this.messagesNotifyEvent.Add(clientId, eventConsume);
         }
     }
 }