public Task <ServiceHealth> IsHealthOk() { (bool Ok, string Message) = _cosmosRepository.IsHealthOk(); ServiceHealth health = new ServiceHealth() { Name = nameof(ProviderSourceDatasetsRepository) }; health.Dependencies.Add(new DependencyHealth { HealthOk = Ok, DependencyName = _cosmosRepository.GetType().GetFriendlyName(), Message = Message }); return(Task.FromResult(health)); }
public async Task <ServiceHealth> IsHealthOk() { var cosmosRepoHealth = await _cosmosRepository.IsHealthOk(); ServiceHealth health = new ServiceHealth() { Name = nameof(ScenariosRepository) }; health.Dependencies.Add(new DependencyHealth { HealthOk = cosmosRepoHealth.Ok, DependencyName = _cosmosRepository.GetType().GetFriendlyName(), Message = cosmosRepoHealth.Message }); return(health); }