Ejemplo n.º 1
0
 public RequestService(IHttpService httpService, IDBService dbService, IRequestDBService requestDBService, IOptions <ServicesOptions> options)
 {
     _httpService      = httpService;
     _dbService        = dbService;
     _requestDBService = requestDBService;
     _config           = options.Value;
 }
Ejemplo n.º 2
0
        private async void CheckServices(object state)
        {
            using (var scope = _serviceScopeFactory.CreateScope())
            {
                IHttpService      _httpService      = scope.ServiceProvider.GetRequiredService <IHttpService>();
                IDBService        _dbService        = scope.ServiceProvider.GetRequiredService <IDBService>();
                IRequestDBService _requestDBService = scope.ServiceProvider.GetRequiredService <IRequestDBService>();

                var services = _dbService.GetServices();

                foreach (var service in services)
                {
                    _requestDBService.SetData(await _httpService.CheckService(service));
                }
            }
        }
Ejemplo n.º 3
0
 public RequestController(IRequestDBService requestDBService)
 {
     _requestDBService = requestDBService;
 }