HealthChecksBuilderAddCheckExtensions.AddTypeActivatedCheck 方法

定义

重载

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[])

Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs

添加具有指定名称和实现的新类型的已激活运行状况检查。

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

运行状况检查实现类型。

参数

name
String

运行状况检查的名称。

args
Object[]

要提供给构造函数的其他参数。

返回

IHealthChecksBuilder

注解

此方法将在需要时使用 CreateInstance<T>(IServiceProvider, Object[]) 创建运行状况检查实例。 可以通过 向构造函数 args提供其他参数。

适用于

AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, Object[])

Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs

添加具有指定名称和实现的新类型的已激活运行状况检查。

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

运行状况检查实现类型。

参数

name
String

运行状况检查的名称。

failureStatus
Nullable<HealthStatus>

在运行状况检查报告失败时应报告的 HealthStatus。 如果提供的值为 null,则将报告 Unhealthy

args
Object[]

要提供给构造函数的其他参数。

返回

IHealthChecksBuilder

注解

此方法将在需要时使用 CreateInstance<T>(IServiceProvider, Object[]) 创建运行状况检查实例。 可以通过 向构造函数 args提供其他参数。

适用于

AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, Object[])

Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs

添加具有指定名称和实现的新类型的已激活运行状况检查。

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

运行状况检查实现类型。

参数

name
String

运行状况检查的名称。

failureStatus
Nullable<HealthStatus>

在运行状况检查报告失败时应报告的 HealthStatus。 如果提供的值为 null,则将报告 Unhealthy

tags
IEnumerable<String>

可用于筛选运行状况检查的标记的列表。

args
Object[]

要提供给构造函数的其他参数。

返回

IHealthChecksBuilder

注解

此方法将在需要时使用 CreateInstance<T>(IServiceProvider, Object[]) 创建运行状况检查实例。 可以通过 向构造函数 args提供其他参数。

适用于

AddTypeActivatedCheck<T>(IHealthChecksBuilder, String, Nullable<HealthStatus>, IEnumerable<String>, TimeSpan, Object[])

Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs
Source:
HealthChecksBuilderAddCheckExtensions.cs

添加具有指定名称和实现的新类型的已激活运行状况检查。

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

运行状况检查实现类型。

参数

name
String

运行状况检查的名称。

failureStatus
Nullable<HealthStatus>

在运行状况检查报告失败时应报告的 HealthStatus。 如果提供的值为 null,则将报告 Unhealthy

tags
IEnumerable<String>

可用于筛选运行状况检查的标记的列表。

timeout
TimeSpan

表示检查超时的 TimeSpan

args
Object[]

要提供给构造函数的其他参数。

返回

IHealthChecksBuilder

注解

此方法将在需要时使用 CreateInstance<T>(IServiceProvider, Object[]) 创建运行状况检查实例。 可以通过 向构造函数 args提供其他参数。

适用于