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

正常性チェックを登録できる IHealthChecksBuilder のインスタンス。An instance of IHealthChecksBuilder from which health checks can be registered.

注釈

この操作はべき等です。複数の呼び出しでは、で1つのインスタンスのみが生成され HealthCheckService IServiceCollection ます。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.

適用対象