2 types derived from HealthCheckService
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
18internal sealed partial class DefaultHealthCheckService : HealthCheckService
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
MockHealthCheckService.cs (1)
12internal class MockHealthCheckService : HealthCheckService
49 references to HealthCheckService
Aspire.Components.Common.Tests (7)
ConformanceTests.cs (7)
108HealthCheckService? healthCheckService = host.Services.GetService<HealthCheckService>(); 123HealthCheckService healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 311HealthCheckService healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 414Assert.Null(host.Services.GetService<HealthCheckService>());
Aspire.Elastic.Clients.Elasticsearch.Tests (4)
AspireElasticClientExtensionsTest.cs (4)
57var healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 90var healthCheckService = host.Services.GetService<HealthCheckService>();
Aspire.Hosting (1)
Health\ResourceHealthCheckService.cs (1)
14internal class ResourceHealthCheckService(ILogger<ResourceHealthCheckService> logger, ResourceNotificationService resourceNotificationService, HealthCheckService healthCheckService, IServiceProvider services, IDistributedApplicationEventing eventing) : BackgroundService
Aspire.Milvus.Client.Tests (4)
AspireMilvusExtensionTests.cs (4)
135var healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 168var healthCheckService = host.Services.GetService<HealthCheckService>();
Aspire.MongoDB.Driver.Tests (8)
AspireMongoDBDriverExtensionsTests.cs (8)
132var healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 154var healthCheckService = host.Services.GetService<HealthCheckService>(); 176var healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 198var healthCheckService = host.Services.GetService<HealthCheckService>();
Aspire.NATS.Net.Tests (4)
AspireNatsClientExtensionsTests.cs (4)
140var healthCheckService = host.Services.GetRequiredService<HealthCheckService>(); 173var healthCheckService = host.Services.GetService<HealthCheckService>();
Aspire.StackExchange.Redis.Tests (2)
AspireRedisExtensionsTests.cs (2)
234var healthCheckService = host.Services.GetRequiredService<HealthCheckService>();
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
193if (app.ApplicationServices.GetService(typeof(HealthCheckService)) == null)
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
57if (endpoints.ServiceProvider.GetService(typeof(HealthCheckService)) == null)
HealthCheckMiddleware.cs (2)
17private readonly HealthCheckService _healthCheckService; 25HealthCheckService healthCheckService)
Microsoft.Extensions.Diagnostics.HealthChecks (9)
DependencyInjection\HealthCheckServiceCollectionExtensions.cs (5)
11/// Provides extension methods for registering <see cref="HealthCheckService"/> in an <see cref="IServiceCollection"/>. 16/// Adds the <see cref="HealthCheckService"/> to the container, using the provided delegate to register 21/// <see cref="HealthCheckService"/> instance in the <see cref="IServiceCollection"/>. It can be invoked 24/// <param name="services">The <see cref="IServiceCollection"/> to add the <see cref="HealthCheckService"/> to.</param> 28services.TryAddSingleton<HealthCheckService, DefaultHealthCheckService>();
HealthCheckPublisherHostedService.cs (2)
21private readonly HealthCheckService _healthCheckService; 32HealthCheckService healthCheckService,
HealthCheckService.cs (1)
18/// The default implementation of <see cref="HealthCheckService"/> is registered in the dependency
HealthCheckServiceOptions.cs (1)
9/// Options for the default implementation of <see cref="HealthCheckService"/>
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
DefaultHealthCheckServiceTest.cs (1)
638return (DefaultHealthCheckService)services.BuildServiceProvider(validateScopes: true).GetRequiredService<HealthCheckService>();
DependencyInjection\ServiceCollectionExtensionsTest.cs (2)
30Assert.Equal(typeof(HealthCheckService), actual.ServiceType); 60Assert.Equal(typeof(HealthCheckService), actual.ServiceType);
Microsoft.Extensions.Diagnostics.Probes (3)
TcpEndpointProbesService.cs (3)
24private readonly HealthCheckService _healthCheckService; 30public TcpEndpointProbesService(ILogger<TcpEndpointProbesService> logger, HealthCheckService healthCheckService, TcpEndpointProbesOptions options) 64/// Executes the health checks in the <see cref="HealthCheckService"/> and opens the registered TCP port if the service is healthy and closes it otherwise.