HealthCheckPublisherOptions.Predicate Property

Definition

Gets or sets a predicate that is used to filter the set of health checks executed.

public Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration,bool>? Predicate { get; set; }

Property Value

Remarks

If Predicate is null, the health check publisher service will run all registered health checks - this is the default behavior. To run a subset of health checks, provide a function that filters the set of checks. The predicate will be evaluated each period.

Applies to

Produkt Versjoner
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)