예제 #1
0
        public void Start()
        {
            _eventStore = new SqlEventStore(() => EventStoreDbContext.Create());

            //_eventStore = new EventStore();

            _eventPublisher = new EventPublisher(_bus);
            _notificationPublisher = new NotificationPublisher(_bus);

            _repository = new MyRepository(_eventStore, _eventPublisher);
            _session = new MySession(_repository);

            //_repository = new Repository(_eventStore, _eventPublisher);
            //_session = new Session(_repository);

            _ndch = new NetworkDeviceCommandHandler(_session, _notificationPublisher);
            _ndvb = new NetworkDeviceViewBuilder();

            _bus.SubscribeHandler<CreateNetworkDevice>(_ndch.Handle);
            _bus.SubscribeHandler<ChangeNetworkDeviceHostName>(_ndch.Handle);
            _bus.SubscribeHandler<NetworkDeviceSetStatus>(_ndch.Handle);

            _bus.SubscribeHandler<NetworkDeviceCreated>(_ndvb.Handle);
            _bus.SubscribeHandler<NetworkDeviceHostnameChanged>(_ndvb.Handle);
            _bus.SubscribeHandler<NetworkDeviceOnlineStatusChanged>(_ndvb.Handle);
        }
		public StorageOperationsTask(TransactionalStorage storage, IndexStorage search, INotificationPublisher notificationPublisher)
		{
			this.storage = storage;
			this.search = search;
			this.notificationPublisher = notificationPublisher;

			InitializeTimer();
		}
예제 #3
0
		public StorageOperationsTask(ITransactionalStorage storage, OrderedPartCollection<AbstractFileDeleteTrigger> deleteTriggers, IndexStorage search, INotificationPublisher notificationPublisher)
		{
			this.storage = storage;
			this.deleteTriggers = deleteTriggers;
			this.search = search;
			this.notificationPublisher = notificationPublisher;

			InitializeTimer();
		}
예제 #4
0
 /// <summary>
 ///     In constructor, we can get needed classes/interfaces.
 ///     They are sent here by dependency injection system automatically.
 /// </summary>
 public TaskAppService(IRepository <Task> taskRepository, IRepository <User, long> userRepository,
                       ISmtpEmailSenderConfiguration smtpEmialSenderConfigtion, INotificationPublisher notificationPublisher)
 {
     _taskRepository        = taskRepository;
     _userRepository        = userRepository;
     _smtpEmialSenderConfig = smtpEmialSenderConfigtion;
     _notificationPublisher = notificationPublisher;
 }
예제 #5
0
 public OrderPlacedNotification(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
예제 #6
0
 public PushController(ITokenStore store, INotificationPublisher queue)
 {
     _store = store;
     _queue = queue;
 }
예제 #7
0
 public HomeController(SignInManager signInManager, INotificationPublisher notificationPublisher)
 {
     _signInManager         = signInManager;
     _notificationPublisher = notificationPublisher;
 }
예제 #8
0
 public HomeController(INotificationPublisher notificationPublisher, IProblemRepository repo)
 {
     _notificationPublisher = notificationPublisher;
     repository             = repo;
 }
 public NotificationPublishAppService(INotificationPublisher notiticationPublisher)
 {
     _notiticationPublisher = notiticationPublisher;
 }
예제 #10
0
 public NotificationAdminService(ISession session, INotificationPublisher notificationPublisher)
 {
     _session = session;
     _notificationPublisher = notificationPublisher;
 }
예제 #11
0
 public NotificationDistributer_Tests()
 {
     _publisher = LocalIocManager.Resolve <INotificationPublisher>();
     _fakeNotificationDistributer = LocalIocManager.Resolve <FakeNotificationDistributer>();
 }
예제 #12
0
 public PluginBackroundWorker(AbpTimer timer, INotificationPublisher notificationPublisher)
     : base(timer)
 {
     _notificationPublisher = notificationPublisher;
     Timer.Period           = 30000;
 }
예제 #13
0
 public ValuesController(INotificationPublisher notificationPublisher, IRepository <TB_ReagentInfo, Int64> _repository)
 {
     _notificationPublisher = notificationPublisher;
     repository             = _repository;
 }
예제 #14
0
 public TodoNotificationsService(INotificationSubscriptionManager notificationSubscriptionManager, INotificationPublisher notificationPublisher, ILocalizationManager localizationManager, IStatusResolver statusResolver)
 {
     _notificationSubscriptionManager = notificationSubscriptionManager;
     _notificationPublisher           = notificationPublisher;
     _localizationManager             = localizationManager;
     _statusResolver = statusResolver;
 }
예제 #15
0
 public NotificationApplicationService(IEventStore eventStore, INotificationPublisher notificationPublisher)
 {
     this._eventStore            = eventStore;
     this._notificationPublisher = notificationPublisher;
 }
 public MediaCategoryUpdatedNotification(IDocumentModifiedUser documentModifiedUser, INotificationPublisher notificationPublisher)
 {
     _documentModifiedUser  = documentModifiedUser;
     _notificationPublisher = notificationPublisher;
 }
예제 #17
0
 public UsersAppNotificationsSender(INotificationPublisher notificationPublisher, INotificationSubscriptionManager notificationSubscriptionManager)
 {
     _notificationPublisher           = notificationPublisher;
     _notificationSubscriptionManager = notificationSubscriptionManager;
 }
예제 #18
0
 public LayoutUpdatedNotification(IDocumentModifiedUser documentModifiedUser, INotificationPublisher notificationPublisher)
 {
     _documentModifiedUser  = documentModifiedUser;
     _notificationPublisher = notificationPublisher;
 }
예제 #19
0
 public AccountController(AbpLoginResultTypeHelper abpLoginResultTypeHelper, LogInManager logInManager, SignInManager signInManager, ITenantCache tenantCache, INotificationPublisher notificationPublisher, AccountAppService accountAppService, UserManager userManager)
 {
     _abpLoginResultTypeHelper = abpLoginResultTypeHelper;
     _logInManager             = logInManager;
     _signInManager            = signInManager;
     _tenantCache           = tenantCache;
     _notificationPublisher = notificationPublisher;
     _accountAppService     = accountAppService;
     _userManager           = userManager;
 }
예제 #20
0
        public StorageOperationsTask(ITransactionalStorage storage, OrderedPartCollection <AbstractFileDeleteTrigger> deleteTriggers, IndexStorage search, INotificationPublisher notificationPublisher)
        {
            this.storage               = storage;
            this.deleteTriggers        = deleteTriggers;
            this.search                = search;
            this.notificationPublisher = notificationPublisher;

            InitializeTimer();
        }
 public PrivateEmailAppService(IBackgroundJobManager backgroundJobManager, INotificationPublisher notificationPublisher)
 {
     _backgroundJobManager = backgroundJobManager;
     _notificationPublisher = notificationPublisher;
 }
예제 #22
0
 public DocumentAddedNotification(INotificationPublisher notificationPublisher, IDocumentModifiedUser documentModifiedUser)
 {
     _notificationPublisher = notificationPublisher;
     _documentModifiedUser  = documentModifiedUser;
 }
예제 #23
0
        public StorageOperationsTask(ITransactionalStorage storage, IndexStorage search, INotificationPublisher notificationPublisher)
        {
            this.storage = storage;
            this.search  = search;
            this.notificationPublisher = notificationPublisher;

            InitializeTimer();
        }
예제 #24
0
 public SendNotificationJob(IRepository <User, long> userRepository, INotificationPublisher notificationPublisher)
 {
     _userRepository        = userRepository;
     _notificationPublisher = notificationPublisher;
 }
 /// <summary>
 /// Publishes a new notification.
 /// </summary>
 /// <param name="notificationPublisher">Notification publisher</param>
 /// <param name="notificationName">Unique notification name</param>
 /// <param name="data">Notification data (optional)</param>
 /// <param name="entityIdentifier">The entity identifier if this notification is related to an entity</param>
 /// <param name="severity">Notification severity</param>
 /// <param name="userIds">Target user id(s). Used to send notification to specific user(s). If this is null/empty, the notification is sent to all subscribed users</param>
 public static void Publish(this INotificationPublisher notificationPublisher, string notificationName, NotificationData data = null, EntityIdentifier entityIdentifier = null, NotificationSeverity severity = NotificationSeverity.Info, UserIdentifier[] userIds = null)
 {
     AsyncHelper.RunSync(() => notificationPublisher.PublishAsync(notificationName, data, entityIdentifier, severity, userIds));
 }
예제 #26
0
 public NotifiableContext(DbContextOptions <TChild> options, INotificationPublisher notificationPublisher) :
     base(options)
 {
     _notificationPublisher = notificationPublisher;
 }
 public NetworkDeviceCommandHandler(ISession session, INotificationPublisher publisher)
 {
     _session   = session;
     _publisher = publisher;
 }
예제 #28
0
 public TestNotifier(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
예제 #29
0
 public AppNotifier(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
 public NotificationApplicationService(INotificationPublisher notificationPublisher)
 {
     this.notificationPublisher = notificationPublisher;
 }
예제 #31
0
 public HomeController(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
 public NotificationApplicationService(IEventStore eventStore, INotificationPublisher notificationPublisher)
 {
     this.eventStore = eventStore;
     this.notificationPublisher = notificationPublisher;
 }
예제 #33
0
        /// <summary>
        /// Publishes a new error notification.
        /// </summary>
        /// <param name="self">Object to be extended.</param>
        /// <param name="message">The displayed text message.</param>
        /// <param name="title">The displayed title.</param>
        /// <param name="displayDuration">Display duration. No auto-remove if null.</param>
        public static void PublishError(this INotificationPublisher self, string message, string title = null, TimeSpan?displayDuration = null)
        {
            Guard.Against.ArgumentNullOrEmpty(message, "message");

            self.Publish(new Notification(message, title, NotificationLevel.Error, displayDuration));
        }
예제 #34
0
        public HomeController(INotificationPublisher notificationPublisher, IEstimateAppService estimateAppService)

        {
            _notificationPublisher = notificationPublisher;
            _estimateAppService    = estimateAppService;
        }
 public アプリケーション通知サービス(INotificationPublisher notificationPublisher)
 {
     this.notificationPublisher = notificationPublisher;
 }
예제 #36
0
 public OrderNotifier(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
예제 #37
0
 public AppNotifier(INotificationPublisher notificationPublisher)
 {
     _notificationPublisher = notificationPublisher;
 }
예제 #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrivateEmailAppService"/> class.
 /// </summary>
 /// <param name="backgroundJobManager">
 /// The background job manager.
 /// </param>
 /// <param name="notificationPublisher">
 /// The notification publisher.
 /// </param>
 public PrivateEmailAppService(IBackgroundJobManager backgroundJobManager, INotificationPublisher notificationPublisher)
 {
     _backgroundJobManager  = backgroundJobManager;
     _notificationPublisher = notificationPublisher;
 }