HealthCheckRegistration 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
HealthCheckRegistration(String, IHealthCheck, Nullable<HealthStatus>, IEnumerable<String>)
為現有 IHealthCheck 執行個體建立新 HealthCheckRegistration。
public:
HealthCheckRegistration(System::String ^ name, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck ^ instance, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags);
public HealthCheckRegistration (string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string>? tags);
new Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration : string * Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration
Public Sub New (name As String, instance As IHealthCheck, failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String))
參數
- name
- String
健康狀態檢查名稱。
- instance
- IHealthCheck
IHealthCheck 執行個體。
- failureStatus
- Nullable<HealthStatus>
健康狀態檢查失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用於篩選健康狀態檢查的標籤清單。
適用於
HealthCheckRegistration(String, Func<IServiceProvider,IHealthCheck>, Nullable<HealthStatus>, IEnumerable<String>)
為現有 IHealthCheck 執行個體建立新 HealthCheckRegistration。
public:
HealthCheckRegistration(System::String ^ name, Func<IServiceProvider ^, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck ^> ^ factory, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags);
public HealthCheckRegistration (string name, Func<IServiceProvider,Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string>? tags);
new Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration : string * Func<IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration
Public Sub New (name As String, factory As Func(Of IServiceProvider, IHealthCheck), failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String))
參數
- name
- String
健康狀態檢查名稱。
- factory
- Func<IServiceProvider,IHealthCheck>
用於建立 IHealthCheck 執行個體的委派。
- failureStatus
- Nullable<HealthStatus>
當健康狀態檢查回報失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用於篩選健康狀態檢查的標籤清單。
適用於
HealthCheckRegistration(String, IHealthCheck, Nullable<HealthStatus>, IEnumerable<String>, Nullable<TimeSpan>)
為現有 IHealthCheck 執行個體建立新 HealthCheckRegistration。
public:
HealthCheckRegistration(System::String ^ name, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck ^ instance, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags, Nullable<TimeSpan> timeout);
public HealthCheckRegistration (string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string>? tags, TimeSpan? timeout);
new Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration : string * Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> * Nullable<TimeSpan> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration
Public Sub New (name As String, instance As IHealthCheck, failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String), timeout As Nullable(Of TimeSpan))
參數
- name
- String
健康狀態檢查名稱。
- instance
- IHealthCheck
IHealthCheck 執行個體。
- failureStatus
- Nullable<HealthStatus>
健康狀態檢查失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用於篩選健康狀態檢查的標籤清單。
適用於
HealthCheckRegistration(String, Func<IServiceProvider,IHealthCheck>, Nullable<HealthStatus>, IEnumerable<String>, Nullable<TimeSpan>)
為現有 IHealthCheck 執行個體建立新 HealthCheckRegistration。
public:
HealthCheckRegistration(System::String ^ name, Func<IServiceProvider ^, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck ^> ^ factory, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags, Nullable<TimeSpan> timeout);
public HealthCheckRegistration (string name, Func<IServiceProvider,Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string>? tags, TimeSpan? timeout);
new Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration : string * Func<IServiceProvider, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck> * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> * Nullable<TimeSpan> -> Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration
Public Sub New (name As String, factory As Func(Of IServiceProvider, IHealthCheck), failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String), timeout As Nullable(Of TimeSpan))
參數
- name
- String
健康狀態檢查名稱。
- factory
- Func<IServiceProvider,IHealthCheck>
用於建立 IHealthCheck 執行個體的委派。
- failureStatus
- Nullable<HealthStatus>
當健康狀態檢查回報失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用於篩選健康狀態檢查的標籤清單。