共用方式為


CommonHealthChecksExtensions.ReportUnhealthy 方法

定義

設定手動健康情況檢查,以傳回狀況不良的狀態和相關聯的原因。

public:
[System::Runtime::CompilerServices::Extension]
 static void ReportUnhealthy(Microsoft::Extensions::Diagnostics::HealthChecks::IManualHealthCheck ^ manualHealthCheck, System::String ^ reason);
public static void ReportUnhealthy (this Microsoft.Extensions.Diagnostics.HealthChecks.IManualHealthCheck manualHealthCheck, string reason);
static member ReportUnhealthy : Microsoft.Extensions.Diagnostics.HealthChecks.IManualHealthCheck * string -> unit
<Extension()>
Public Sub ReportUnhealthy (manualHealthCheck As IManualHealthCheck, reason As String)

參數

manualHealthCheck
IManualHealthCheck

IManualHealthCheck

reason
String

健康情況檢查狀況不良的原因。

例外狀況

manualHealthChecknull

適用於