public BackgroundServiceHealthCheck( IIndexDataStoreFactory indexDataStoreFactory, IOptions <DeletedInstanceCleanupConfiguration> deletedInstanceCleanupConfiguration, TelemetryClient telemetryClient, BackgroundServiceHealthCheckCache backgroundServiceHealthCheckCache) { EnsureArg.IsNotNull(indexDataStoreFactory, nameof(indexDataStoreFactory)); EnsureArg.IsNotNull(deletedInstanceCleanupConfiguration?.Value, nameof(deletedInstanceCleanupConfiguration)); EnsureArg.IsNotNull(telemetryClient, nameof(telemetryClient)); EnsureArg.IsNotNull(backgroundServiceHealthCheckCache, nameof(backgroundServiceHealthCheckCache)); _indexDataStore = indexDataStoreFactory.GetInstance(); _deletedInstanceCleanupConfiguration = deletedInstanceCleanupConfiguration.Value; _telemetryClient = telemetryClient; _backgroundServiceHealthCheckCache = backgroundServiceHealthCheckCache; }
public BackgroundServiceHealthCheck( IIndexDataStore indexDataStore, IOptions <DeletedInstanceCleanupConfiguration> deletedInstanceCleanupConfiguration, TelemetryClient telemetryClient, BackgroundServiceHealthCheckCache backgroundServiceHealthCheckCache, ILogger <BackgroundServiceHealthCheck> logger) { EnsureArg.IsNotNull(indexDataStore, nameof(indexDataStore)); EnsureArg.IsNotNull(deletedInstanceCleanupConfiguration?.Value, nameof(deletedInstanceCleanupConfiguration)); EnsureArg.IsNotNull(telemetryClient, nameof(telemetryClient)); EnsureArg.IsNotNull(backgroundServiceHealthCheckCache, nameof(backgroundServiceHealthCheckCache)); EnsureArg.IsNotNull(logger, nameof(logger)); _indexDataStore = indexDataStore; _deletedInstanceCleanupConfiguration = deletedInstanceCleanupConfiguration.Value; _telemetryClient = telemetryClient; _backgroundServiceHealthCheckCache = backgroundServiceHealthCheckCache; _logger = logger; }