HealthCheckResult.Unhealthy 方法

定义

创建一个表示运行不正常的组件的 HealthCheckResult

public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy (string description = default, Exception exception = default, System.Collections.Generic.IReadOnlyDictionary<string,object> data = default);
public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy (string? description = default, Exception? exception = default, System.Collections.Generic.IReadOnlyDictionary<string,object>? data = default);
static member Unhealthy : string * Exception * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult
Public Shared Function Unhealthy (Optional description As String = Nothing, Optional exception As Exception = Nothing, Optional data As IReadOnlyDictionary(Of String, Object) = Nothing) As HealthCheckResult

参数

description
String

检查的组件状态的可读说明。 可选。

exception
Exception

一个 Exception,表示在检查状态时引发的异常。 可选。

data
IReadOnlyDictionary<String,Object>

描述组件运行状况的附加键值对。 可选。

返回

一个表示运行不正常的组件的 HealthCheckResult

适用于