Class HealthCheckResults
Represents the results of executing a collection of health checks.
Inheritance
Namespace: Umbraco.Cms.Core.HealthChecks
Assembly: Umbraco.Core.dll
Syntax
public class HealthCheckResults
Fields
View SourceAllChecksSuccessful
Indicates whether all health checks completed successfully.
Declaration
public readonly bool AllChecksSuccessful
Field Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceCreate(IEnumerable<HealthCheck>)
Creates a new HealthCheckResults instance by executing the specified health checks.
Declaration
public static Task<HealthCheckResults> Create(IEnumerable<HealthCheck> checks)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<HealthCheck> | checks | The health checks to execute. |
Returns
| Type | Description |
|---|---|
| Task<HealthCheckResults> | A task that represents the asynchronous operation containing the health check results. |
Create(HealthCheck)
Creates a new HealthCheckResults instance by executing a single health check.
Declaration
public static Task<HealthCheckResults> Create(HealthCheck check)
Parameters
| Type | Name | Description |
|---|---|---|
| HealthCheck | check | The health check to execute. |
Returns
| Type | Description |
|---|---|
| Task<HealthCheckResults> | A task that represents the asynchronous operation containing the health check results. |
GetResultsForStatus(StatusResultType)
Gets the health check results filtered by the specified status result type.
Declaration
public Dictionary<string, IEnumerable<HealthCheckStatus>>? GetResultsForStatus(StatusResultType resultType)
Parameters
| Type | Name | Description |
|---|---|---|
| StatusResultType | resultType | The status result type to filter by. |
Returns
| Type | Description |
|---|---|
| Dictionary<string, IEnumerable<HealthCheckStatus>> | A dictionary of health check results matching the specified status, or null if the result type is not recognized. |
LogResults()
Logs the health check results to the application logger.
Declaration
public void LogResults()
ResultsAsMarkDown(HealthCheckNotificationVerbosity)
Converts the health check results to a markdown-formatted string.
Declaration
public string ResultsAsMarkDown(HealthCheckNotificationVerbosity verbosity)
Parameters
| Type | Name | Description |
|---|---|---|
| HealthCheckNotificationVerbosity | verbosity | The verbosity level for the output. |
Returns
| Type | Description |
|---|---|
| string | A markdown-formatted string representation of the results. |