Example #1
0
 public MonitorLoop(
     GenerateThisInstanceGuidService thisGuid,
     ILogger <MonitorLoop> logger,
     ISharedDataAccess data,
     ICacheProviderAsync cache,
     IHostApplicationLifetime applicationLifetime,
     IOnKeysEventsSubscribeService subscribe)
 {
     _logger            = logger;
     _data              = data;
     _cache             = cache;
     _subscribe         = subscribe;
     _cancellationToken = applicationLifetime.ApplicationStopping;
     _guid              = thisGuid.ThisBackServerGuid();
 }
Example #2
0
        public QueuedHostedService(
            GenerateThisInstanceGuidService thisGuid,
            IBackgroundTaskQueue taskQueue,
            ILogger <QueuedHostedService> logger,
            ISharedDataAccess data,
            ICacheProviderAsync cache,
            IKeyEventsProvider keyEvents)
        {
            TaskQueue  = taskQueue;
            _logger    = logger;
            _data      = data;
            _cache     = cache;
            _keyEvents = keyEvents;

            _guid = thisGuid.ThisBackServerGuid();
        }