Beispiel #1
0
        public BackgroundService(ILogger <BackgroundService> logger,
                                 IConnectionPool connectionPool,
                                 MapGenerationService mapGenerationService,
                                 IOptions <BackgroundServiceOptions> options,
                                 WorldInfoService worldInfoService,
                                 IServiceScopeFactory serviceFactory,
                                 IRemoteImageRepository remoteImageRepository)
        {
            _serviceFactory           = serviceFactory;
            _logger                   = logger;
            _connectionPool           = connectionPool;
            _mapGenerationService     = mapGenerationService;
            _worldInfoService         = worldInfoService;
            _backgroundServiceOptions = options.Value;
            _remoteImageRepository    = remoteImageRepository;

            _nextBackgroundTaskRun = DateTimeOffset.Now;
        }
Beispiel #2
0
 public BackService(IServiceScopeFactory serviceScopeFactory, IOptions <BackgroundServiceOptions> options)
 {
     _serviceScopeFactory = serviceScopeFactory;
     _config = options.Value;
 }