示例#1
0
        public NotificationAppService(
            IRepository <NotificationInfo, Guid> notificationRepository,
            IRepository <TenantNotificationInfo, Guid> tenantNotificationRepository,
            IRepository <UserNotificationInfo, Guid> userNotificationRepository,
            IRepository <NotificationSubscriptionInfo, Guid> notificationSubscriptionRepository,

            INotificationDefinitionManager notificationDefinitionManager,
            INotificationPublisher notiticationPublisher,
            INotificationSubscriptionManager notificationSubscriptionManager,
            IUserNotificationManager userNotificationManager,

            ILocalizationContext localizationContext,
            SysObjectSettingManager sysObjectSettingManager)
            : base(sysObjectSettingManager)
        {
            _notificationRepository             = notificationRepository;
            _tenantNotificationRepository       = tenantNotificationRepository;
            _userNotificationRepository         = userNotificationRepository;
            _notificationSubscriptionRepository = notificationSubscriptionRepository;

            _notificationDefinitionManager   = notificationDefinitionManager;
            _notiticationPublisher           = notiticationPublisher;
            _userNotificationManager         = userNotificationManager;
            _localizationContext             = localizationContext;
            _notificationSubscriptionManager = notificationSubscriptionManager;
        }
示例#2
0
 /// <summary>
 ///     Gets notifications for a user.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="user">User.</param>
 /// <param name="state">State</param>
 /// <param name="skipCount">Skip count.</param>
 /// <param name="maxResultCount">Maximum result count.</param>
 public static List <UserNotification> GetUserNotifications(this IUserNotificationManager userNotificationManager,
                                                            UserIdentifier user, UserNotificationState?state = null, int skipCount = 0,
                                                            int maxResultCount = int.MaxValue)
 {
     return
         (AsyncHelper.RunSync(
              () => userNotificationManager.GetUserNotificationsAsync(user, state, skipCount, maxResultCount)));
 }
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager, 
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager = notificationDefinitionManager;
     _userNotificationManager = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
 }
示例#4
0
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager,
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager   = notificationDefinitionManager;
     _userNotificationManager         = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
 }
示例#5
0
 public SessionAppService(IPictureManager pictureManager,
                          ISubscribableEditionCache subscribableEditionCache,
                          IUserNotificationManager userNotificationManager,
                          VappsTenantCache tenantCache)
 {
     this._pictureManager           = pictureManager;
     this._subscribableEditionCache = subscribableEditionCache;
     this._userNotificationManager  = userNotificationManager;
     this._tenantCache = tenantCache;
 }
示例#6
0
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager,
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager   = notificationDefinitionManager;
     _userNotificationManager         = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
     _userIdentifier = new Abp.UserIdentifier(AbpSession.TenantId, AbpSession.GetUserId());
 }
示例#7
0
 public DemoAppService(
     IOnlineClientManager onlineClientManager,
     INotificationSubscriptionManager notificationSubscriptionManager,
     INotificationPublisher notificationPublisher,
     IUserNotificationManager userNotificationManager)
 {
     _onlineClientManager             = onlineClientManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
     _notificationPublisher           = notificationPublisher;
     _userNotificationManager         = userNotificationManager;
 }
示例#8
0
        public NotificationAppService(
            INotificationDefinitionManager notificationDefinitionManager,
            IUserNotificationManager userNotificationManager,
            INotificationSubscriptionManager notificationSubscriptionManager,
            IRepository <UserNotificationInfo, Guid> userNotificationRepository)
        {
            _notificationDefinitionManager   = notificationDefinitionManager;
            _userNotificationManager         = userNotificationManager;
            _notificationSubscriptionManager = notificationSubscriptionManager;

            _userNotificationRepository = userNotificationRepository;
        }
示例#9
0
        public AccountAppService(
            UserRegistrationManager userRegistrationManager,
            INotificationSubscriptionManager notificationSubscriptionManager,
            IAppNotifier appNotifier,

            IRealTimeNotifier realTimeNotifier,
            IUserNotificationManager userNotificationManager)
        {
            _userRegistrationManager         = userRegistrationManager;
            _notificationSubscriptionManager = notificationSubscriptionManager;
            _appNotifier = appNotifier;

            _userNotificationManager = userNotificationManager;
            _realTimeNotifier        = realTimeNotifier;
        }
示例#10
0
 public UserAppService(
     IRepository <User, long> repository,
     UserManager userManager,
     IRepository <User, long> userRepository,
     IRepository <Role> roleRepository,
     RoleManager roleManager,
     IRepository <Attendance, Guid> attendanceRepository,
     IRepository <Course, Guid> courseRepository,
     IUserNotificationManager userNotificationManager)
     : base(repository)
 {
     _userManager             = userManager;
     _userRepository          = userRepository;
     _roleRepository          = roleRepository;
     _roleManager             = roleManager;
     _attendanceRepository    = attendanceRepository;
     _courseRepository        = courseRepository;
     _userNotificationManager = userNotificationManager;
 }
 /// <summary>
 /// Deletes all notifications of a user.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="user">The user id.</param>
 public static void DeleteAllUserNotifications(this IUserNotificationManager userNotificationManager, UserIdentifier user)
 {
     AsyncHelper.RunSync(() => userNotificationManager.DeleteAllUserNotificationsAsync(user));
 }
 /// <summary>
 /// Deletes a user notification.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="tenantId">Tenant Id</param>
 /// <param name="userNotificationId">The user notification id.</param>
 public static void DeleteUserNotification(this IUserNotificationManager userNotificationManager, int?tenantId, Guid userNotificationId)
 {
     AsyncHelper.RunSync(() => userNotificationManager.DeleteUserNotificationAsync(tenantId, userNotificationId));
 }
 /// <summary>
 /// Updates all notification states for a user.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="user">User.</param>
 /// <param name="state">New state.</param>
 public static void UpdateAllUserNotificationStates(this IUserNotificationManager userNotificationManager, UserIdentifier user, UserNotificationState state)
 {
     AsyncHelper.RunSync(() => userNotificationManager.UpdateAllUserNotificationStatesAsync(user, state));
 }
 /// <summary>
 /// Updates a user notification state.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="tenantId">Tenant Id</param>
 /// <param name="userNotificationId">The user notification id.</param>
 /// <param name="state">New state.</param>
 public static void UpdateUserNotificationState(this IUserNotificationManager userNotificationManager, int?tenantId, Guid userNotificationId, UserNotificationState state)
 {
     AsyncHelper.RunSync(() => userNotificationManager.UpdateUserNotificationStateAsync(tenantId, userNotificationId, state));
 }
 /// <summary>
 /// Gets a user notification by given id.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="tenantId">Tenant Id</param>
 /// <param name="userNotificationId">The user notification id.</param>
 public static UserNotification GetUserNotification(this IUserNotificationManager userNotificationManager, int?tenantId, Guid userNotificationId)
 {
     return(AsyncHelper.RunSync(() => userNotificationManager.GetUserNotificationAsync(tenantId, userNotificationId)));
 }
 /// <summary>
 /// Gets user notification count.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="user">User.</param>
 /// <param name="state">State.</param>
 public static int GetUserNotificationCount(this IUserNotificationManager userNotificationManager, UserIdentifier user, UserNotificationState?state = null)
 {
     return(AsyncHelper.RunSync(() => userNotificationManager.GetUserNotificationCountAsync(user, state)));
 }
示例#17
0
 public UserNotificationManager_Tests()
 {
     _userNotificationManager = Resolve <IUserNotificationManager>();
 }
示例#18
0
 /// <summary>
 /// Deletes all notifications of a user.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="userId">The user id.</param>
 public static void DeleteAllUserNotificationsAsync(this IUserNotificationManager userNotificationManager, long userId)
 {
     AsyncHelper.RunSync(() => userNotificationManager.DeleteAllUserNotificationsAsync(userId));
 }
示例#19
0
 public UserNotifier(IUserNotificationManager userNotificationManager)
 {
     this.userNotificationManager = userNotificationManager;
 }
示例#20
0
 public UserNotificationsService(IUserNotificationManager userNotificationManager)
 {
     _userNotificationManager = userNotificationManager;
 }
 /// <summary>
 /// Gets a user notification by given id.
 /// </summary>
 /// <param name="userNotificationManager">User notificaiton manager</param>
 /// <param name="tenantId">Tenant Id</param>
 /// <param name="userNotificationId">The user notification id.</param>
 public static UserNotificationDto GetUserNotification(this IUserNotificationManager userNotificationManager, Guid userNotificationId)
 {
     return(AsyncHelper.RunSync(() => userNotificationManager.GetUserNotificationAsync(userNotificationId)));
 }
示例#22
0
 public CommonController(IUserNotificationManager notificationManager,
                         ICacheManager cacheManager)
 {
     this._notificationManager = notificationManager;
     this._cacheManager        = cacheManager;
 }