共用方式為


HealthCheckResult 建構函式

定義

使用指定的 statusexceptiondescriptiondata 的值來建立新 HealthCheckResult

public HealthCheckResult (Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string? description = default, Exception? exception = default, System.Collections.Generic.IReadOnlyDictionary<string,object>? data = default);
new Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult : Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus * string * Exception * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult
Public Sub New (status As HealthStatus, Optional description As String = Nothing, Optional exception As Exception = Nothing, Optional data As IReadOnlyDictionary(Of String, Object) = Nothing)

參數

status
HealthStatus

指出已檢查元件之狀態的值。

description
String

可供人員閱讀的已檢查元件狀態描述。

exception
Exception

代表檢查狀態時擲回之例外狀況的 Exception (如有)。

data
IReadOnlyDictionary<String,Object>

描述元件健康狀態的其他索引鍵/值組。

適用於