Exemple #1
0
 public void RemoveRegistration(Registrant subscriber, PulsarMessage.MessageType messageType)
 {
     if (subscriber != null)
     {
         var registrantToRemove = Registrants.Find(reg => reg.Subscriber == subscriber && reg.Type == messageType);
         if (registrantToRemove != null)
         {
             Registrants.Remove(registrantToRemove);
         }
     }
 }
Exemple #2
0
 public void RemoveRegistration(Registrant subscriber, PulsarMessage.MessageType messageType)
 {
     if (subscriber != null)
     {
         var registrantToRemove = Registrants.Find(reg => reg.Subscriber == subscriber && reg.Type == messageType);
         if (registrantToRemove != null)
         {
             try
             {
                 Registrants.Remove(registrantToRemove);
             }
             catch (PulsarMessageException removeRegistrantException)
             {
                 removeRegistrantException.Source  = "[MessageQueue:RemoveRegistration]";
                 removeRegistrantException.Message = "Unable to remove subscriber from Registrant list";
                 throw removeRegistrantException;
             }
         }
     }
 }