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); } } }
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; } } } }