HealthCheckService 類別

定義

可用來檢查應用程式中所登錄 IHealthCheck 執行個體狀態的服務。A service which can be used to check the status of IHealthCheck instances registered in the application.

public ref class HealthCheckService abstract
public abstract class HealthCheckService
type HealthCheckService = class
Public MustInherit Class HealthCheckService
繼承
HealthCheckService

備註

的預設實 HealthCheckService 作為藉由呼叫,在相依性插入容器中註冊為單一服務 AddHealthChecks(IServiceCollection)The default implementation of HealthCheckService is registered in the dependency injection container as a singleton service by calling AddHealthChecks(IServiceCollection).

IHealthChecksBuilder傳回的AddHealthChecks(IServiceCollection)The IHealthChecksBuilder returned by AddHealthChecks(IServiceCollection) 提供用來註冊健康情況檢查的便利 API。provides a convenience API for registering health checks.

IHealthCheck 您可以透過提供的擴充方法來註冊 IHealthChecksBuilder IHealthCheck implementations can be registered through extension methods provided by IHealthChecksBuilder.

建構函式

HealthCheckService()

方法

CheckHealthAsync(CancellationToken)

在應用程式中執行所有健康狀態檢查,並傳回彙總的狀態。Runs all the health checks in the application and returns the aggregated status.

CheckHealthAsync(Func<HealthCheckRegistration,Boolean>, CancellationToken)

執行提供的健康狀態檢查,並傳回匯總的狀態。Runs the provided health checks and returns the aggregated status.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於