/// <summary> /// Default constructor /// </summary> /// <param name="notificationHandlers">Array of notification handlers</param> public MessageManager(INotificationHandler[] notificationHandlers) { _notificationHandlers = notificationHandlers .SelectMany(h => h.NotificationTypes.Select(nt => new { Handler = h, Type = nt })) .ToLookup(h => h.Type, h => h.Handler, StringComparer.OrdinalIgnoreCase); }