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)

属性值

Func<HealthCheckRegistration,Boolean>

注解

null如果是PredicateHealthCheckMiddleware将运行所有已注册的运行状况检查 - 这是默认行为。 若要运行运行状况检查的子集,请提供用于筛选检查集的函数。

适用于