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 (正常) 、 Degraded 200 (正常) 以及 Unhealthy 映射到 503 (服务不可用) 。