public WebHookFailureNotifier( HealthChecksDb db, IOptions <Settings> settings, ServerAddressesService serverAddressesService, ILogger <WebHookFailureNotifier> logger, IHttpClientFactory httpClientFactory) { _db = db ?? throw new ArgumentNullException(nameof(db)); _serverAddressesService = serverAddressesService ?? throw new ArgumentNullException(nameof(serverAddressesService)); _settings = settings.Value ?? new Settings(); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _httpClient = httpClientFactory.CreateClient(Keys.HEALTH_CHECK_WEBHOOK_HTTP_CLIENT_NAME); }
public HealthCheckCollectorHostedService (IServiceProvider provider, IOptions <Settings> settings, ServerAddressesService serverAddressesService, ILogger <HealthCheckCollectorHostedService> logger, IHostApplicationLifetime lifetime) { _serviceProvider = provider ?? throw new ArgumentNullException(nameof(provider)); _serverAddressesService = serverAddressesService ?? throw new ArgumentNullException(nameof(serverAddressesService)); _logger = logger ?? throw new ArgumentNullException(nameof(provider)); _lifetime = lifetime ?? throw new ArgumentNullException(nameof(lifetime)); _settings = settings.Value ?? new Settings(); _cancellationTokenSource = new CancellationTokenSource(); }
public HealthCheckReportCollector( HealthChecksDb db, IHealthCheckFailureNotifier healthCheckFailureNotifier, IOptions <Settings> settings, IHttpClientFactory httpClientFactory, ILogger <HealthCheckReportCollector> logger, ServerAddressesService serverAddressService) { _db = db ?? throw new ArgumentNullException(nameof(db)); _healthCheckFailureNotifier = healthCheckFailureNotifier ?? throw new ArgumentNullException(nameof(healthCheckFailureNotifier)); _settings = settings.Value ?? throw new ArgumentNullException(nameof(settings)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _serverAddressService = serverAddressService ?? throw new ArgumentNullException(nameof(serverAddressService)); _httpClient = httpClientFactory.CreateClient(Keys.HEALTH_CHECK_HTTP_CLIENT_NAME); }