public UserNotificationsUpdaterFilter( IWorkContextAccessor wca, IClock clock, IProcessingEngine processingEngine, ShellSettings shellSettings, IShellDescriptorManager shellDescriptorManager, INotificationsToUserDispatcher notificationsDispatcher) { _wca = wca; _clock = clock; _processingEngine = processingEngine; _shellSettings = shellSettings; _shellDescriptorManager = shellDescriptorManager; }
public NotificationWidgetPartHandler(INotificationsToUserDispatcher notificationDispatcher, IWorkContextAccessor wca, ISiteService siteService) { OnActivated <NotificationWidgetPart>((context, part) => { part.UnreadNotificationsField.Loader(() => { var currentUser = wca.GetContext().CurrentUser; if (currentUser == null) { return(Enumerable.Empty <INotification>().ToList()); } var notificationCount = siteService.GetSiteSettings().As <NotificationWidgetSettingsPart>().NotificationCount; var unreadNotifications = notificationDispatcher .GetRecentNotificationsForUser(currentUser, notificationCount, true) .ToList(); return(unreadNotifications); }); }); }
public NotificationWidgetPartHandler(INotificationsToUserDispatcher notificationDispatcher, IWorkContextAccessor wca, ISiteService siteService) { OnActivated<NotificationWidgetPart>((context, part) => { part.UnreadNotificationsField.Loader(() => { var currentUser = wca.GetContext().CurrentUser; if (currentUser == null) { return Enumerable.Empty<INotification>().ToList(); } var notificationCount = siteService.GetSiteSettings().As<NotificationWidgetSettingsPart>().NotificationCount; var unreadNotifications = notificationDispatcher .GetRecentNotificationsForUser(currentUser, notificationCount, true) .ToList(); return unreadNotifications; }); }); }
public UserNotificationsUpdaterEventHandler(INotificationsToUserDispatcher notificationsDispatcher, IContentManager contentManager) { _notificationsDispatcher = notificationsDispatcher; _contentManager = contentManager; }