Пример #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;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationSubscriptionManager"/> class.
 /// </summary>
 public NotificationSubscriptionManager(
     INotificationRepository notificationRepository,
     INotificationDefinitionManager notificationDefinitionManager)
 {
     _notificationRepository        = notificationRepository;
     _notificationDefinitionManager = notificationDefinitionManager;
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
        /// </summary>
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore)
        {
            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationStore             = notificationStore;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationSubscriptionManager"/> class.
 /// </summary>
 public NotificationSubscriptionManager(
     INotificationStore store,
     INotificationDefinitionManager notificationDefinitionManager,
     IGuidGenerator guidGenerator)
 {
     _store = store;
     _notificationDefinitionManager = notificationDefinitionManager;
     _guidGenerator = guidGenerator;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
        /// </summary>
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore)
        {
            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationStore = notificationStore;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
Пример #6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="NotificationSubscriptionManager" /> class.
 /// </summary>
 public NotificationSubscriptionManager(
     INotificationStore store,
     INotificationDefinitionManager notificationDefinitionManager,
     IGuidGenerator guidGenerator)
 {
     this.store = store;
     this.notificationDefinitionManager = notificationDefinitionManager;
     this.guidGenerator = guidGenerator;
 }
 public MyNotificationAppService(
     INotificationStore notificationStore,
     INotificationSender notificationSender,
     INotificationDefinitionManager notificationDefinitionManager)
 {
     NotificationStore             = notificationStore;
     NotificationSender            = notificationSender;
     NotificationDefinitionManager = notificationDefinitionManager;
 }
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager, 
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager = notificationDefinitionManager;
     _userNotificationManager = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
 }
Пример #9
0
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager,
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager   = notificationDefinitionManager;
     _userNotificationManager         = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
 }
Пример #10
0
 public NotificationAppService(
     INotificationDefinitionManager notificationDefinitionManager,
     IUserNotificationManager userNotificationManager,
     INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationDefinitionManager   = notificationDefinitionManager;
     _userNotificationManager         = userNotificationManager;
     _notificationSubscriptionManager = notificationSubscriptionManager;
     _userIdentifier = new Abp.UserIdentifier(AbpSession.TenantId, AbpSession.GetUserId());
 }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationSubscriptionManager"/> class.
 /// </summary>
 public NotificationSubscriptionManager(
     INotificationStore store,
     INotificationDefinitionManager notificationDefinitionManager,
     IClock clock,
     ICurrentTenant currentTenant)
 {
     _store = store;
     _notificationDefinitionManager = notificationDefinitionManager;
     _clock         = clock;
     _currentTenant = currentTenant;
 }
Пример #12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
        /// 初始化<see cref="NotificationDistributionJob"/>类新的实例
        /// </summary>
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore,
            IUnitOfWorkManager unitOfWorkManager)
        {
            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationStore             = notificationStore;
            _unitOfWorkManager             = unitOfWorkManager;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
        /// </summary>
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore,
            IUnitOfWorkManager unitOfWorkManager)
        {
            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationStore = notificationStore;
            _unitOfWorkManager = unitOfWorkManager;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
Пример #14
0
        public NotificationAppService(
            INotificationDefinitionManager notificationDefinitionManager,
            IUserNotificationManager userNotificationManager,
            INotificationSubscriptionManager notificationSubscriptionManager,
            IRepository <UserNotificationInfo, Guid> userNotificationRepository)
        {
            _notificationDefinitionManager   = notificationDefinitionManager;
            _userNotificationManager         = userNotificationManager;
            _notificationSubscriptionManager = notificationSubscriptionManager;

            _userNotificationRepository = userNotificationRepository;
        }
        public NotificationManager(
            INotificationStore store, 
            INotificationDefinitionManager notificationDefinitionManager,
            IUnitOfWorkManager unitOfWorkManager,
            IUserNotificationQueue userNotificationQueue)
        {
            _store = store;
            _notificationDefinitionManager = notificationDefinitionManager;
            _unitOfWorkManager = unitOfWorkManager;
            _userNotificationQueue = userNotificationQueue;

            Logger = NullLogger.Instance;
        }
Пример #16
0
        public NotificationManager(
            INotificationStore store,
            INotificationDefinitionManager notificationDefinitionManager,
            IUnitOfWorkManager unitOfWorkManager,
            IBackgroundJobManager backgroundJobManager)
        {
            _store = store;
            _notificationDefinitionManager = notificationDefinitionManager;
            _unitOfWorkManager             = unitOfWorkManager;
            _backgroundJobManager          = backgroundJobManager;

            Logger = NullLogger.Instance;
        }
Пример #17
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="NotificationDistributionJob" /> class.
        /// </summary>
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore,
            IUnitOfWorkManager unitOfWorkManager,
            IGuidGenerator guidGenerator)
        {
            this.notificationDefinitionManager = notificationDefinitionManager;
            this.notificationStore             = notificationStore;
            this.unitOfWorkManager             = unitOfWorkManager;
            this.guidGenerator = guidGenerator;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
        public UserNotificationQueue(
            INotificationStore store, 
            INotificationDefinitionManager notificationDefinitionManager, 
            IUnitOfWorkManager unitOfWorkManager, 
            IRealTimeNotifier realTimeNotifier)
        {
            _store = store;
            _notificationDefinitionManager = notificationDefinitionManager;
            _unitOfWorkManager = unitOfWorkManager;
            _realTimeNotifier = realTimeNotifier;

            Logger = NullLogger.Instance;
        }
Пример #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
        /// </summary>
        public DefaultNotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationStore notificationStore,
            IUnitOfWorkManager unitOfWorkManager,
            IGuidGenerator guidGenerator)
        {
            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationStore             = notificationStore;
            _unitOfWorkManager             = unitOfWorkManager;
            _guidGenerator = guidGenerator;

            RealTimeNotifier = NullRealTimeNotifier.Instance;
        }
        public NotificationManager(
            INotificationStore store, 
            INotificationDefinitionManager notificationDefinitionManager,
            IUnitOfWorkManager unitOfWorkManager,
            IBackgroundJobManager backgroundJobManager)
        {
            _store = store;
            _notificationDefinitionManager = notificationDefinitionManager;
            _unitOfWorkManager = unitOfWorkManager;
            _backgroundJobManager = backgroundJobManager;

            Logger = NullLogger.Instance;
        }
        public NotificationDistributer(
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationRepository notificationRepository,
            ISettingService settingService,
            IRealTimeNotifier realTimeNotifier)
        {
            Logger            = NullLogger <NotificationDistributer> .Instance;
            _realTimeNotifier = realTimeNotifier;

            _notificationDefinitionManager = notificationDefinitionManager;
            _notificationRepository        = notificationRepository;
            _settingService = settingService;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
 /// </summary>
 public DefaultNotificationDistributer(
     INotificationConfiguration notificationConfiguration,
     INotificationDefinitionManager notificationDefinitionManager,
     INotificationStore notificationStore,
     IUnitOfWorkManager unitOfWorkManager,
     IGuidGenerator guidGenerator,
     IIocResolver iocResolver)
 {
     _notificationConfiguration     = notificationConfiguration;
     _notificationDefinitionManager = notificationDefinitionManager;
     _notificationStore             = notificationStore;
     _unitOfWorkManager             = unitOfWorkManager;
     _guidGenerator = guidGenerator;
     _iocResolver   = iocResolver;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultNotificationDispatcher"/> class.
        /// </summary>
        public DefaultNotificationDispatcher(
            IBackgroundJobManager backgroundJobManager,
            IOptions <AbpNotificationOptions> options,
            INotificationStore notificationStore,
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationPublishProviderManager notificationPublishProviderManager)
        {
            _backgroundJobManager               = backgroundJobManager;
            _notificationOptions                = options.Value;
            _notificationStore                  = notificationStore;
            _notificationDefinitionManager      = notificationDefinitionManager;
            _notificationPublishProviderManager = notificationPublishProviderManager;

            DistributedEventBus = NullDistributedEventBus.Instance;
            Logger = NullLogger <DefaultNotificationDispatcher> .Instance;
        }
Пример #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationDistributionJob"/> class.
 /// </summary>
 public ShaNotificationDistributer(
     INotificationConfiguration notificationConfiguration,
     INotificationDefinitionManager notificationDefinitionManager,
     INotificationStore notificationStore,
     IUnitOfWorkManager unitOfWorkManager,
     IGuidGenerator guidGenerator,
     IIocResolver iocResolver, IRepository <NotificationMessage, Guid> messageRepository, IRepository <StoredFile, Guid> storedFileRepository, IRepository <NotificationMessageAttachment, Guid> attachmentRepository)
 {
     _notificationConfiguration     = notificationConfiguration;
     _notificationDefinitionManager = notificationDefinitionManager;
     _notificationStore             = notificationStore;
     _unitOfWorkManager             = unitOfWorkManager;
     _guidGenerator        = guidGenerator;
     _iocResolver          = iocResolver;
     _messageRepository    = messageRepository;
     _storedFileRepository = storedFileRepository;
     _attachmentRepository = attachmentRepository;
 }
Пример #25
0
 public DefaultNotificationDistributer(
     IOptions <NotificationOptions> notificationOptions,
     INotificationDefinitionManager notificationDefinitionManager,
     INotificationStore notificationStore,
     ILoggerFactory loggerFactory,
     ISettingProvider settingProvider,
     IServiceProvider serviceProvider,
     ICurrentTenant currentTenant,
     IUnitOfWorkManager unitOfWorkManager)
 {
     Options = notificationOptions.Value;
     NotificationDefinitionManager = notificationDefinitionManager;
     NotificationStore             = notificationStore;
     Logger            = loggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance;
     SettingProvider   = settingProvider;
     ServiceProvider   = serviceProvider;
     CurrentTenant     = currentTenant;
     UnitOfWorkManager = unitOfWorkManager;
 }
Пример #26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationEventHandler"/> class.
        /// </summary>
        public NotificationEventHandler(
            IJsonSerializer jsonSerializer,
            IBackgroundJobManager backgroundJobManager,
            IOptions <AbpNotificationOptions> options,
            INotificationStore notificationStore,
            INotificationDefinitionManager notificationDefinitionManager,
            INotificationSubscriptionManager notificationSubscriptionManager,
            INotificationPublishProviderManager notificationPublishProviderManager)
        {
            Options                            = options.Value;
            JsonSerializer                     = jsonSerializer;
            BackgroundJobManager               = backgroundJobManager;
            NotificationStore                  = notificationStore;
            NotificationDefinitionManager      = notificationDefinitionManager;
            NotificationSubscriptionManager    = notificationSubscriptionManager;
            NotificationPublishProviderManager = notificationPublishProviderManager;

            Logger = NullLogger <NotificationEventHandler> .Instance;
        }
Пример #27
0
 public NotificationsTestsDefinitionProvider_Tests()
 {
     NotificationDefinitionManager = GetRequiredService <INotificationDefinitionManager>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationSubscriptionManager"/> class.
 /// 初始化一个新实例<see cref="NotificationSubscriptionManager"/>通知订阅管理类。
 /// </summary>
 public NotificationSubscriptionManager(INotificationStore store, INotificationDefinitionManager notificationDefinitionManager)
 {
     _store = store;
     _notificationDefinitionManager = notificationDefinitionManager;
 }
Пример #29
0
 public NotificationDefinitionContext(INotificationDefinitionManager manager)
 {
     Manager = manager;
 }
 /// <summary>
 /// Gets all available notification definitions for given user.
 /// </summary>
 /// <param name="notificationDefinitionManager">Notification definition manager</param>
 /// <param name="user">User</param>
 public static IReadOnlyList <NotificationDefinition> GetAllAvailable(this INotificationDefinitionManager notificationDefinitionManager, UserIdentifier user)
 {
     return(AsyncHelper.RunSync(() => notificationDefinitionManager.GetAllAvailableAsync(user)));
 }
Пример #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationSubscriptionManager"/> class.
 /// </summary>
 public NotificationSubscriptionManager(INotificationStore store, INotificationDefinitionManager notificationDefinitionManager)
 {
     _store = store;
     _notificationDefinitionManager = notificationDefinitionManager;
 }
Пример #32
0
 /// <summary>
 /// Gets all available notification definitions for given <see cref="tenantId"/> and <see cref="userId"/>.
 /// </summary>
 /// <param name="notificationDefinitionManager">Notification definition manager</param>
 /// <param name="tenantId">Tenant id</param>
 /// <param name="userId">User id</param>
 public static IReadOnlyList <NotificationDefinition> GetAllAvailable(this INotificationDefinitionManager notificationDefinitionManager, int?tenantId, long userId)
 {
     return(AsyncHelper.RunSync(() => notificationDefinitionManager.GetAllAvailableAsync(tenantId, userId)));
 }
 public NotificationDefinitionContext(INotificationDefinitionManager manager)
 {
     Manager = manager;
 }