HealthCheckPublisherOptions.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; }
member this.Predicate : Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration, bool> with get, set
Public Property Predicate As Func(Of HealthCheckRegistration, Boolean)

属性值

注解

如果 Predicatenull,则运行状况检查发布者服务将运行所有已注册的运行状况检查 - 这是默认行为。 若要运行运行状况检查的子集,请提供用于筛选检查集的函数。 将评估每个句点的谓词。

适用于