共用方式為


HealthCheckOptions.Predicate 屬性

定義

取得或設定用來篩選所執行健康狀態檢查集的述詞。

public:
 property Func<Microsoft::Extensions::Diagnostics::HealthChecks::HealthCheckRegistration ^, bool> ^ Predicate { Func<Microsoft::Extensions::Diagnostics::HealthChecks::HealthCheckRegistration ^, bool> ^ get(); void set(Func<Microsoft::Extensions::Diagnostics::HealthChecks::HealthCheckRegistration ^, bool> ^ value); };
public Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration,bool> Predicate { get; set; }
public Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration,bool>? Predicate { get; set; }
member this.Predicate : Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> with get, set
Public Property Predicate As Func(Of HealthCheckRegistration, Boolean)

屬性值

備註

如果 Predicatenull ,則會 HealthCheckMiddleware 執行所有已註冊的健康情況檢查 - 這是預設行為。 若要執行一部分的健康狀態檢查,請提供可篩選該組檢查的函式。

適用於