public PublishAppEventsHandlerToClientService(
     PapercutIPCommClientFactory ipCommClientFactory,
     ILogger logger)
 {
     this._ipCommClientFactory = ipCommClientFactory;
     this._logger = logger;
 }
Exemple #2
0
        public BackendServiceCoordinator(
            ILogger logger,
            IMessageBus messageBus,
            PapercutIPCommClientFactory ipCommClientFactory)
        {
            this._logger              = logger;
            this._messageBus          = messageBus;
            this._ipCommClientFactory = ipCommClientFactory;

            IObservable <RulesUpdatedEvent> rulesUpdateObservable = Observable
                                                                    .Create <RulesUpdatedEvent>(
                o =>
            {
                this._nextUpdateEvent = o.OnNext;
                return(Disposable.Empty);
            }).SubscribeOn(TaskPoolScheduler.Default);

            // flush rules every 10 seconds
            rulesUpdateObservable.Buffer(TimeSpan.FromSeconds(10))
            .Where(e => e.Any())
            .Subscribe(async events => await this.PublishUpdateEvent(events.Last()));
        }
Exemple #3
0
 public SingleInstanceCheck(PapercutIPCommClientFactory ipCommClientFactory,
                            ILogger logger)
 {
     this.Logger = logger;
     this._ipCommClientFactory = ipCommClientFactory;
 }
 public SingleInstanceService(PapercutIPCommClientFactory ipCommClientFactory,
                              ILogger logger)
 {
     Logger = logger;
     _ipCommClientFactory = ipCommClientFactory;
 }