示例#1
0
 public DatasourcesContainer(IDatasourcesFabric datasourcesFabric, ISystemConfig configProvider, IEventQueueWriter eventQueue, IGameStorageClient gameStorage)
     : base(configProvider)
 {
     _datasourcesFabric = datasourcesFabric;
     _eventQueue        = eventQueue;
     _gameStorage       = gameStorage;
 }
示例#2
0
        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));
        }
示例#3
0
 public ApiManager(IGameStorageClient gamesStorage, ICacheManager cache)
 {
     _gamesStorage = gamesStorage;
     _cache        = cache;
 }
示例#4
0
 public DataprocessorBase(ISystemConfig configProvider, IEventQueueReader queue, IGameStorageClient storage)
     : base(configProvider)
 {
     Queue   = queue;
     Storage = storage;
 }