5 instantiations of HealthReport
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
69var report = new HealthReport(entries, totalElapsedTime);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherTests.cs (1)
164return new HealthReport(healthStatusRecords, TimeSpan.Zero);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
HealthReportTest.cs (2)
20var result = new HealthReport(new Dictionary<string, HealthReportEntry>() 39var result = new HealthReport(new Dictionary<string, HealthReportEntry>()
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
MockHealthCheckService.cs (1)
27return Task.FromResult(new HealthReport(healthStatusRecords, TimeSpan.Zero));
50 references to HealthReport
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
313HealthReport healthReport = await healthCheckService.CheckHealthAsync().ConfigureAwait(false);
Aspire.Elastic.Clients.Elasticsearch.Tests (1)
AspireElasticClientExtensionsTest.cs (1)
59var healthCheckReport = await healthCheckService.CheckHealthAsync();
Aspire.Hosting (2)
Health\ResourceHealthCheckService.cs (2)
99static bool ContainsAnyHealthReportChange(HealthReport report, ImmutableArray<HealthReportSnapshot> latestHealthReportSnapshots) 157ImmutableArray<HealthReportSnapshot> MergeHealthReports(ImmutableArray<HealthReportSnapshot> healthReports, HealthReport report)
Aspire.Milvus.Client.Tests (1)
AspireMilvusExtensionTests.cs (1)
137var healthCheckReport = await healthCheckService.CheckHealthAsync();
Aspire.MongoDB.Driver.Tests (2)
AspireMongoDBDriverExtensionsTests.cs (2)
134var healthCheckReport = await healthCheckService.CheckHealthAsync(); 178var healthCheckReport = await healthCheckService.CheckHealthAsync();
Aspire.NATS.Net.Tests (1)
AspireNatsClientExtensionsTests.cs (1)
171var healthCheckReport = await healthCheckService.CheckHealthAsync();
Aspire.Qdrant.Client.Tests (1)
AspireQdrantClientExtensionsTest.cs (1)
51var healthCheckReport = await healthCheckService.CheckHealthAsync();
HealthChecksSample (1)
CustomWriterStartup.cs (1)
41private static Task WriteResponse(HttpContext httpContext, HealthReport result)
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
HealthCheckMiddleware.cs (1)
46var result = await _healthCheckService.CheckHealthAsync(_healthCheckOptions.Predicate, httpContext.RequestAborted);
HealthCheckOptions.cs (2)
69/// of <see cref="HealthReport.Status"/> as a string. 71public Func<HttpContext, HealthReport, Task> ResponseWriter { get; set; } = HealthCheckResponseWriters.WriteMinimalPlaintext;
HealthCheckResponseWriters.cs (1)
16public static Task WriteMinimalPlaintext(HttpContext httpContext, HealthReport result)
Microsoft.Extensions.Diagnostics.HealthChecks (8)
DefaultHealthCheckService.cs (2)
38public override async Task<HealthReport> CheckHealthAsync( 69var report = new HealthReport(entries, totalElapsedTime);
HealthCheckPublisherHostedService.cs (2)
192var report = await _healthCheckService.CheckHealthAsync(withOptionsPredicate, cancellationToken).ConfigureAwait(false); 204private async Task RunPublisherAsync(IHealthCheckPublisher publisher, HealthReport report, CancellationToken cancellationToken)
HealthCheckService.cs (4)
40/// yielding a <see cref="HealthReport"/> containing the results. 43public Task<HealthReport> CheckHealthAsync(CancellationToken cancellationToken = default) 57/// yielding a <see cref="HealthReport"/> containing the results. 60public abstract Task<HealthReport> CheckHealthAsync(
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
TelemetryHealthCheckPublisher.cs (2)
39/// <param name="report">The <see cref="HealthReport"/>. The result of executing a set of health checks.</param> 42public Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherTests.cs (1)
152private static HealthReport CreateHealthReport(IEnumerable<HealthStatus> healthStatuses)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (20)
DefaultHealthCheckServiceTest.cs (13)
80var results = await service.CheckHealthAsync(); 134var results = await service.CheckHealthAsync(); 183var results = await service.CheckHealthAsync(c => c.Name == "HealthyCheck"); 216var results = await service.CheckHealthAsync(); 288var results = await service.CheckHealthAsync(); 347var results = await service.CheckHealthAsync(); 369var results = await service.CheckHealthAsync(); 393var results = await service.CheckHealthAsync(); 419var results = await service.CheckHealthAsync(); 450var results = await service.CheckHealthAsync(); 473var results = await service.CheckHealthAsync(); 547var results = await service.CheckHealthAsync(); 604var results = await service.CheckHealthAsync();
HealthCheckPublisherHostedServiceTest.cs (5)
210var report = Assert.Single(publisher.Entries).report; 434var report = Assert.Single(publishers[i].Entries).report; 804public List<(HealthReport report, CancellationToken cancellationToken)> Entries { get; } = new List<(HealthReport report, CancellationToken cancellationToken)>(); 812public async Task PublishAsync(HealthReport report, CancellationToken cancellationToken)
HealthReportTest.cs (2)
20var result = new HealthReport(new Dictionary<string, HealthReportEntry>() 39var result = new HealthReport(new Dictionary<string, HealthReportEntry>()
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesService.cs (1)
43var report = await _healthCheckService.CheckHealthAsync(_options.FilterChecks, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.Diagnostics.Probes.Tests (4)
MockHealthCheckService.cs (4)
14private readonly Task<HealthReport> _healthyReport = CreateHealthReport(HealthStatus.Healthy); 15private readonly Task<HealthReport> _unhealthyReport = CreateHealthReport(HealthStatus.Unhealthy); 18public override Task<HealthReport> CheckHealthAsync(Func<HealthCheckRegistration, bool>? predicate, CancellationToken cancellationToken = default) 23private static Task<HealthReport> CreateHealthReport(HealthStatus healthStatus)