private void Notify(Notificators.EventType notificationEvent) { foreach (INotifier notifier in Notifiers) { try { notifier.Notify(notificationEvent); SendMessage(string.Format("Notified {0}", notifier.GetDisplayName())); } catch (Exception ex) { SendMessage(string.Format("Unable to notify {0}: {1}", notifier.GetDisplayName(), ex.Message)); } } }
public void Notify(string entityId, T notification) { var operations = Notificators.GetOrAdd(entityId, PrivateNotificatorFabric()); operations.AddNotification(notification); }