HealthChecksBuilderAddCheckExtensions.AddTypeActivatedCheck 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Object[]) |
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。 |
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, Object[]) |
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。 |
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, Object[]) |
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。 |
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, TimeSpan, Object[]) |
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。 |
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Object[])
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。
public:
generic <typename T>
where T : class, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddTypeActivatedCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, ... cli::array <System::Object ^> ^ args);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck<T> (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck;
static member AddTypeActivatedCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * obj[] -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck)
<Extension()>
Public Function AddTypeActivatedCheck(Of T As {Class, IHealthCheck}) (builder As IHealthChecksBuilder, name As String, ParamArray args As Object()) As IHealthChecksBuilder
類型參數
- T
健康情況檢查實作類型。
參數
- builder
- IHealthChecksBuilder
- name
- String
健康狀態檢查的名稱。
- args
- Object[]
要提供給建構函式的其他引數。
傳回
備註
此方法會在需要時使用 CreateInstance<T>(IServiceProvider, Object[]) 來建立健康情況檢查實例。 您可以透過 args
將其他自變數提供給建構函式。
適用於
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, Object[])
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。
public:
generic <typename T>
where T : class, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddTypeActivatedCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, ... cli::array <System::Object ^> ^ args);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck<T> (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck;
static member AddTypeActivatedCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * obj[] -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck)
<Extension()>
Public Function AddTypeActivatedCheck(Of T As {Class, IHealthCheck}) (builder As IHealthChecksBuilder, name As String, failureStatus As Nullable(Of HealthStatus), ParamArray args As Object()) As IHealthChecksBuilder
類型參數
- T
健康情況檢查實作類型。
參數
- builder
- IHealthChecksBuilder
- name
- String
健康狀態檢查的名稱。
- failureStatus
- Nullable<HealthStatus>
當健康狀態檢查回報失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- args
- Object[]
要提供給建構函式的其他引數。
傳回
備註
此方法會在需要時使用 CreateInstance<T>(IServiceProvider, Object[]) 來建立健康情況檢查實例。 您可以透過 args
將其他自變數提供給建構函式。
適用於
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, Object[])
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。
public:
generic <typename T>
where T : class, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddTypeActivatedCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags, ... cli::array <System::Object ^> ^ args);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck<T> (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string>? tags, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck;
static member AddTypeActivatedCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> * obj[] -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck)
<Extension()>
Public Function AddTypeActivatedCheck(Of T As {Class, IHealthCheck}) (builder As IHealthChecksBuilder, name As String, failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String), ParamArray args As Object()) As IHealthChecksBuilder
類型參數
- T
健康情況檢查實作類型。
參數
- builder
- IHealthChecksBuilder
- name
- String
健康狀態檢查的名稱。
- failureStatus
- Nullable<HealthStatus>
當健康狀態檢查回報失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用來篩選健康狀態檢查的標籤清單。
- args
- Object[]
要提供給建構函式的其他引數。
傳回
備註
此方法會在需要時使用 CreateInstance<T>(IServiceProvider, Object[]) 來建立健康情況檢查實例。 您可以透過 args
將其他自變數提供給建構函式。
適用於
AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, TimeSpan, Object[])
新增具有指定名稱和實作之新類型已啟用的健康狀態檢查。
public:
generic <typename T>
where T : class, Microsoft::Extensions::Diagnostics::HealthChecks::IHealthCheck[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddTypeActivatedCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, Nullable<Microsoft::Extensions::Diagnostics::HealthChecks::HealthStatus> failureStatus, System::Collections::Generic::IEnumerable<System::String ^> ^ tags, TimeSpan timeout, ... cli::array <System::Object ^> ^ args);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck<T> (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable<string> tags, TimeSpan timeout, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck;
static member AddTypeActivatedCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Nullable<Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus> * seq<string> * TimeSpan * obj[] -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder (requires 'T : null and 'T :> Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck)
<Extension()>
Public Function AddTypeActivatedCheck(Of T As {Class, IHealthCheck}) (builder As IHealthChecksBuilder, name As String, failureStatus As Nullable(Of HealthStatus), tags As IEnumerable(Of String), timeout As TimeSpan, ParamArray args As Object()) As IHealthChecksBuilder
類型參數
- T
健康情況檢查實作類型。
參數
- builder
- IHealthChecksBuilder
- name
- String
健康狀態檢查的名稱。
- failureStatus
- Nullable<HealthStatus>
當健康狀態檢查回報失敗時應回報的 HealthStatus。 如果提供的值為 null
,則會回報 Unhealthy。
- tags
- IEnumerable<String>
可用來篩選健康狀態檢查的標籤清單。
- args
- Object[]
要提供給建構函式的其他引數。
傳回
備註
此方法會在需要時使用 CreateInstance<T>(IServiceProvider, Object[]) 來建立健康情況檢查實例。 您可以透過 args
將其他自變數提供給建構函式。