17 instantiations of HealthReportSnapshot
Aspire.Hosting (2)
Health\ResourceHealthCheckService.cs (1)
301var snapshot = new HealthReportSnapshot(key, entry.Status, entry.Description, entry.Exception?.ToString())
Orchestrator\ApplicationOrchestrator.cs (1)
808var reports = annotations.Select(annotation => new HealthReportSnapshot(annotation.Key, null, null, null));
Aspire.Hosting.Browsers (3)
BrowserLogsSessionManager.cs (3)
402reports.Add(new HealthReportSnapshot( 414reports.Add(new HealthReportSnapshot( 425reports.Add(new HealthReportSnapshot(
Aspire.Hosting.Browsers.Tests (3)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (3)
402reports.Add(new HealthReportSnapshot( 414reports.Add(new HealthReportSnapshot( 425reports.Add(new HealthReportSnapshot(
Aspire.Hosting.DevTunnels (1)
DevTunnelMonitor.cs (1)
694new(key, healthy ? HealthStatus.Healthy : HealthStatus.Unhealthy, description, null)
Aspire.Hosting.Tests (8)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (2)
198new HealthReportSnapshot("check1", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Healthy, "All good", null), 199new HealthReportSnapshot("check2", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Unhealthy, "Failed", "Exception occurred")
Health\HealthStatusTests.cs (1)
26var reports = healthStatusStrings?.Select<string?, HealthReportSnapshot>((h, i) => new HealthReportSnapshot(i.ToString(), h is null ? null : Enum.Parse<HealthStatus>(h), null, null)).ToImmutableArray() ?? [];
Health\ResourceHealthCheckServiceTests.cs (1)
189HealthReports = [new HealthReportSnapshot("healthcheck_a", Status: null, Description: null, ExceptionText: null)]
ResourceNotificationTests.cs (4)
267new HealthReportSnapshot("browser-session", HealthStatus.Unhealthy, "Browser session failed.", "InvalidOperationException: Browser crashed.") 647new HealthReportSnapshot("dependency1-health", HealthStatus.Healthy, "Dependency is healthy.", null) 665new HealthReportSnapshot("dependency2-health", HealthStatus.Healthy, "Dependency is healthy.", null) 1974new("health", HealthStatus.Healthy, "Healthy", ExceptionText: null)
19 references to HealthReportSnapshot
Aspire.Hosting (14)
ApplicationModel\CustomResourceSnapshot.cs (3)
19private readonly ImmutableArray<HealthReportSnapshot> _healthReports = []; 111public ImmutableArray<HealthReportSnapshot> HealthReports 167internal static HealthStatus? ComputeHealthStatus(ImmutableArray<HealthReportSnapshot> healthReports, string? state)
ApplicationModel\CustomResourceSnapshotExtensions.cs (1)
25public static CustomResourceSnapshot WithHealthReports(this CustomResourceSnapshot snapshot, ImmutableArray<HealthReportSnapshot> healthReports)
ApplicationModel\ResourceNotificationService.cs (1)
1373foreach (var report in snapshot.HealthReports)
Dashboard\proto\Partials.cs (1)
129foreach (var report in snapshot.HealthReports)
Dashboard\ResourceSnapshot.cs (1)
30public required ImmutableArray<HealthReportSnapshot> HealthReports { get; init; }
Health\ResourceHealthCheckService.cs (6)
234private static bool ContainsAnyHealthReportChange(HealthReport report, ImmutableArray<HealthReportSnapshot> latestHealthReportSnapshots) 239if (!healthCheckNameToStatus.TryGetValue(key, out var checkReportSnapshot)) 295private static ImmutableArray<HealthReportSnapshot> MergeHealthReports(ImmutableArray<HealthReportSnapshot> healthReports, HealthReport report, DateTime runAt) 301var snapshot = new HealthReportSnapshot(key, entry.Status, entry.Description, entry.Exception?.ToString()) 309var existing = builder[i];
Orchestrator\ApplicationOrchestrator.cs (1)
801private static ImmutableArray<HealthReportSnapshot> GetInitialHealthReports(IResource resource)
Aspire.Hosting.Browsers (2)
BrowserLogsSessionManager.cs (2)
395private ImmutableArray<HealthReportSnapshot> GetHealthReports(ResourceSessionState resourceState, PendingBrowserSession? pendingSession) 398var reports = new List<HealthReportSnapshot>(resourceState.ActiveSessions.Count + (pendingSession is null ? 0 : 1));
Aspire.Hosting.Browsers.Tests (2)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (2)
395private ImmutableArray<HealthReportSnapshot> GetHealthReports(ResourceSessionState resourceState, PendingBrowserSession? pendingSession) 398var reports = new List<HealthReportSnapshot>(resourceState.ActiveSessions.Count + (pendingSession is null ? 0 : 1));
Aspire.Hosting.Tests (1)
Health\HealthStatusTests.cs (1)
26var reports = healthStatusStrings?.Select<string?, HealthReportSnapshot>((h, i) => new HealthReportSnapshot(i.ToString(), h is null ? null : Enum.Parse<HealthStatus>(h), null, null)).ToImmutableArray() ?? [];