public EventStoreBackgroundService(IEventStoreQueue storeQueue, IEventDbWriter eventWriter, IOptions <ApplicationSettings> options, IEventCleaner eventCleaner, IHostApplicationLifetime applicationLifetime) { _storeQueue = storeQueue; _eventWriter = eventWriter; _options = options; _eventCleaner = eventCleaner; _applicationLifetime = applicationLifetime; _localQueue = new Queue <Event>(); }
public EventPushBackgroundService(IEventQueue eventQueue, IHubContext <EventHub, IEventClient> hubContext, IdentityGenerator identityGenerator, IOptions <ApplicationSettings> options, IEventStoreQueue storeQueue, IMemoryCache memoryCache) { _eventQueue = eventQueue; _hubContext = hubContext; _identityGenerator = identityGenerator; _options = options; _storeQueue = storeQueue; _memoryCache = memoryCache; }
public EventStoreBackgroundService(ILogger <EventStoreBackgroundService> logger, IEventStoreQueue storeQueue, IHubContext <EventHub, IEventClient> context, EventWriter eventWriter, IdentityGenerator identityGenerator, IOptionsMonitor <PrimarySettings> options, IMemoryCache memoryCache) { Logger = logger; StoreQueue = storeQueue; Context = context; EventWriter = eventWriter; IdentityGenerator = identityGenerator; MemoryCache = memoryCache; Options = options.CurrentValue; }
public FakeLoggerProvider(IOptionsMonitor <FakeLoggerOptions> options, IEventStoreQueue eventStoreQueue) { var loggerOptions = options.CurrentValue; _interval = loggerOptions.FlushPeriod; _batchSize = loggerOptions.BatchSize; _queueSize = loggerOptions.BackgroundQueueSize; _eventStoreQueue = eventStoreQueue ?? throw new ArgumentNullException(nameof(eventStoreQueue)); _processId = Process.GetCurrentProcess().Id; _optionsChangeToken = options.OnChange(UpdateOptions); UpdateOptions(options.CurrentValue); }