public NotificationCountersServiceResponse GetCounters() { var response = new NotificationCountersServiceResponse(); var currentContact = UserConnection.CurrentUser.ContactId; INotificationCounterFactory factory = ClassFactory .Get <INotificationCounterFactory>(new ConstructorArgument("userConnection", UserConnection)); INotificationCountHandler handler = ClassFactory .Get <INotificationCountHandler>(new ConstructorArgument("factory", factory)); try { IDictionary <string, int> counters = handler.GetNotificationCounters(currentContact, NotificationGroupConst.All); response.NotificationCounters = counters; } catch (Exception ex) { response.Exception = ex; } return(response); }
public NotificationCountHandler(INotificationCounterFactory factory) { factory.CheckArgumentNull(nameof(factory)); _factory = factory; }