2 instantiations of HealthCheckAnnotation
Aspire.Hosting (2)
Dashboard\DashboardLifecycleHook.cs (1)
182dashboardResource.Annotations.Add(new HealthCheckAnnotation(KnownHealthCheckNames.DashboardHealthCheck));
ResourceBuilderExtensions.cs (1)
1356builder.WithAnnotation(new HealthCheckAnnotation(key));
12 references to HealthCheckAnnotation
Aspire.Hosting (8)
ApplicationModel\ResourceNotificationService.cs (3)
194if (dependency.TryGetAnnotationsOfType<HealthCheckAnnotation>(out var _)) 232/// without <see cref="HealthCheckAnnotation"/> annotations will be considered healthy once 260/// without <see cref="HealthCheckAnnotation"/> annotations will be considered healthy once
DistributedApplicationBuilder.cs (1)
434r => r.Annotations.OfType<HealthCheckAnnotation>().Select(hca => new { Resource = r, Annotation = hca })
Health\ResourceHealthCheckService.cs (1)
108if (!resource.TryGetAnnotationsIncludingAncestorsOfType<HealthCheckAnnotation>(out var annotations))
Orchestrator\ApplicationOrchestrator.cs (1)
439if (!resource.TryGetAnnotationsIncludingAncestorsOfType<HealthCheckAnnotation>(out var annotations))
ResourceBuilderExtensions.cs (2)
1311/// Adds a <see cref="HealthCheckAnnotation"/> to the resource annotations to associate a resource with a named health check managed by the health check service. 1351if (builder.Resource.TryGetAnnotationsOfType<HealthCheckAnnotation>(out var annotations) && annotations.Any(a => a.Key == key))
Aspire.Hosting.PostgreSQL.Tests (1)
AddPostgresTests.cs (1)
22Assert.Single(redis.Resource.Annotations, a => a is HealthCheckAnnotation hca && hca.Key == "postgres_check");
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
20Assert.Single(redis.Resource.Annotations, a => a is HealthCheckAnnotation hca && hca.Key == "redis_check");
Aspire.Hosting.Tests (2)
ExternalServiceTests.cs (2)
204Assert.True(externalService.Resource.TryGetAnnotationsOfType<HealthCheckAnnotation>(out var healthCheckAnnotations)); 220Assert.True(externalService.Resource.TryGetAnnotationsOfType<HealthCheckAnnotation>(out var healthCheckAnnotations));