HealthCheckServiceCollectionExtensions.AddHealthChecks(IServiceCollection) 메서드

정의

제공된 대리자를 통해 상태 검사를 등록하여 컨테이너에 HealthCheckService를 추가합니다.Adds the HealthCheckService to the container, using the provided delegate to register health checks.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddHealthChecks(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddHealthChecks (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHealthChecks : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder
<Extension()>
Public Function AddHealthChecks (services As IServiceCollection) As IHealthChecksBuilder

매개 변수

반환

상태 검사를 등록할 수 있는 IHealthChecksBuilder의 인스턴스입니다.An instance of IHealthChecksBuilder from which health checks can be registered.

설명

이 작업은 idempotent입니다. 여러 호출은 IServiceCollection의 단일 HealthCheckService 인스턴스만 발생 합니다.This operation is idempotent - multiple invocations will still only result in a single HealthCheckService instance in the IServiceCollection. 여러 위치에서 IHealthChecksBuilder에 대 한 액세스 권한을 얻기 위해 여러 번 호출할 수 있습니다.It can be invoked multiple times in order to get access to the IHealthChecksBuilder in multiple places.

적용 대상