public UserNotificationsUpdaterFilter(
     IWorkContextAccessor wca,
     IClock clock,
     IProcessingEngine processingEngine,
     ShellSettings shellSettings,
     IShellDescriptorManager shellDescriptorManager,
     INotificationsToUserDispatcher notificationsDispatcher)
 {
     _wca = wca;
     _clock = clock;
     _processingEngine = processingEngine;
     _shellSettings = shellSettings;
     _shellDescriptorManager = shellDescriptorManager;
 }
예제 #2
0
 public UserNotificationsUpdaterFilter(
     IWorkContextAccessor wca,
     IClock clock,
     IProcessingEngine processingEngine,
     ShellSettings shellSettings,
     IShellDescriptorManager shellDescriptorManager,
     INotificationsToUserDispatcher notificationsDispatcher)
 {
     _wca                    = wca;
     _clock                  = clock;
     _processingEngine       = processingEngine;
     _shellSettings          = shellSettings;
     _shellDescriptorManager = shellDescriptorManager;
 }
예제 #3
0
        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;
 }
예제 #6
0
 public UserNotificationsUpdaterEventHandler(INotificationsToUserDispatcher notificationsDispatcher, IContentManager contentManager)
 {
     _notificationsDispatcher = notificationsDispatcher;
     _contentManager          = contentManager;
 }