HealthCheckOptions.ResultStatusCodes 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定字典, HealthStatus 將 對應至套用至回應的 HTTP 狀態碼。 這個屬性可用來設定針對每個狀態傳回的狀態碼。
public:
property System::Collections::Generic::IDictionary<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus, int> ^ ResultStatusCodes { System::Collections::Generic::IDictionary<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus, int> ^ get(); };
public:
property System::Collections::Generic::IDictionary<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus, int> ^ ResultStatusCodes { System::Collections::Generic::IDictionary<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus, int> ^ get(); void set(System::Collections::Generic::IDictionary<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus, int> ^ value); };
public System.Collections.Generic.IDictionary<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus,int> ResultStatusCodes { get; }
public System.Collections.Generic.IDictionary<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus,int> ResultStatusCodes { get; set; }
member this.ResultStatusCodes : System.Collections.Generic.IDictionary<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus, int>
member this.ResultStatusCodes : System.Collections.Generic.IDictionary<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus, int> with get, set
Public ReadOnly Property ResultStatusCodes As IDictionary(Of HealthStatus, Integer)
Public Property ResultStatusCodes As IDictionary(Of HealthStatus, Integer)
屬性值
例外狀況
如果設定此屬性時至少有一個 HealthStatus 遺失,則會擲回 。
備註
將此屬性設定為 null
將對應重設為預設值,其對應 Healthy 至 200 (OK) 、 Degraded 200 (OK) 和 Unhealthy 503 (服務無法使用) 。