共用方式為


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

適用於