public DatasourcesContainer(IDatasourcesFabric datasourcesFabric, ISystemConfig configProvider, IEventQueueWriter eventQueue, IGameStorageClient gameStorage) : base(configProvider) { _datasourcesFabric = datasourcesFabric; _eventQueue = eventQueue; _gameStorage = gameStorage; }
protected override Task ExecuteAsync(CancellationToken stoppingToken) { _datasourcesFabric = _serviceScope.ServiceProvider.GetService <IDatasourcesFabric>(); _configProvider = _serviceScope.ServiceProvider.GetService <ISystemConfig>(); _eventQueue = _serviceScope.ServiceProvider.GetService <IEventQueueClient>(); _gameStorage = _serviceScope.ServiceProvider.GetService <IGameStorageClient>(); _processor = new DataprocessorBase(_configProvider, _eventQueue, _gameStorage); _dssContainer = new DatasourcesContainer(_datasourcesFabric, _configProvider, _eventQueue, _gameStorage); Task.Factory.StartNew((obj) => _dssContainer.Start(), stoppingToken, TaskCreationOptions.LongRunning); _processor.Start(); return(Task.FromResult(1)); }
public ApiManager(IGameStorageClient gamesStorage, ICacheManager cache) { _gamesStorage = gamesStorage; _cache = cache; }
public DataprocessorBase(ISystemConfig configProvider, IEventQueueReader queue, IGameStorageClient storage) : base(configProvider) { Queue = queue; Storage = storage; }