16 instantiations of HealthReportSnapshot
Aspire.Hosting (2)
Health\ResourceHealthCheckService.cs (1)
293var snapshot = new HealthReportSnapshot(key, entry.Status, entry.Description, entry.Exception?.ToString())
Orchestrator\ApplicationOrchestrator.cs (1)
751var reports = annotations.Select(annotation => new HealthReportSnapshot(annotation.Key, null, null, null));
Aspire.Hosting.Browsers (3)
BrowserLogsSessionManager.cs (3)
403reports.Add(new HealthReportSnapshot( 415reports.Add(new HealthReportSnapshot( 426reports.Add(new HealthReportSnapshot(
Aspire.Hosting.Browsers.Tests (3)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (3)
403reports.Add(new HealthReportSnapshot( 415reports.Add(new HealthReportSnapshot( 426reports.Add(new HealthReportSnapshot(
Aspire.Hosting.Tests (8)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (2)
196new HealthReportSnapshot("check1", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus.Healthy, "All good", null), 197new 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)
156new HealthReportSnapshot("browser-session", HealthStatus.Unhealthy, "Browser session failed.", "InvalidOperationException: Browser crashed.") 434new HealthReportSnapshot("dependency1-health", HealthStatus.Healthy, "Dependency is healthy.", null) 452new HealthReportSnapshot("dependency2-health", HealthStatus.Healthy, "Dependency is healthy.", null) 1516new("health", HealthStatus.Healthy, "Healthy", ExceptionText: null)
19 references to HealthReportSnapshot
Aspire.Hosting (14)
ApplicationModel\CustomResourceSnapshot.cs (3)
19private readonly ImmutableArray<HealthReportSnapshot> _healthReports = []; 92public ImmutableArray<HealthReportSnapshot> HealthReports 148internal 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)
1304foreach (var report in snapshot.HealthReports)
Dashboard\proto\Partials.cs (1)
128foreach (var report in snapshot.HealthReports)
Dashboard\ResourceSnapshot.cs (1)
29public 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)) 287private static ImmutableArray<HealthReportSnapshot> MergeHealthReports(ImmutableArray<HealthReportSnapshot> healthReports, HealthReport report, DateTime runAt) 293var snapshot = new HealthReportSnapshot(key, entry.Status, entry.Description, entry.Exception?.ToString()) 301var existing = builder[i];
Orchestrator\ApplicationOrchestrator.cs (1)
744private static ImmutableArray<HealthReportSnapshot> GetInitialHealthReports(IResource resource)
Aspire.Hosting.Browsers (2)
BrowserLogsSessionManager.cs (2)
396private ImmutableArray<HealthReportSnapshot> GetHealthReports(ResourceSessionState resourceState, PendingBrowserSession? pendingSession) 399var reports = new List<HealthReportSnapshot>(resourceState.ActiveSessions.Count + (pendingSession is null ? 0 : 1));
Aspire.Hosting.Browsers.Tests (2)
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (2)
396private ImmutableArray<HealthReportSnapshot> GetHealthReports(ResourceSessionState resourceState, PendingBrowserSession? pendingSession) 399var 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() ?? [];