HealthChecksBuilderAddCheckExtensions.AddTypeActivatedCheck Method

Definition

Overloads

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

Adds a new type activated health check with the specified name and implementation.

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

Adds a new type activated health check with the specified name and implementation.

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

Adds a new type activated health check with the specified name and implementation.

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

Adds a new type activated health check with the specified name and implementation.

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

Adds a new type activated health check with the specified name and implementation.

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

Type Parameters

T

The health check implementation type.

Parameters

name
String

The name of the health check.

args
Object[]

Additional arguments to provide to the constructor.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder.

Remarks

This method will use CreateInstance<T>(IServiceProvider, Object[]) to create the health check instance when needed. Additional arguments can be provided to the constructor via args.

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

Adds a new type activated health check with the specified name and implementation.

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

Type Parameters

T

The health check implementation type.

Parameters

name
String

The name of the health check.

failureStatus
Nullable<HealthStatus>

The HealthStatus that should be reported when the health check reports a failure. If the provided value is null, then Unhealthy will be reported.

args
Object[]

Additional arguments to provide to the constructor.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder.

Remarks

This method will use CreateInstance<T>(IServiceProvider, Object[]) to create the health check instance when needed. Additional arguments can be provided to the constructor via args.

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

Adds a new type activated health check with the specified name and implementation.

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

Type Parameters

T

The health check implementation type.

Parameters

name
String

The name of the health check.

failureStatus
Nullable<HealthStatus>

The HealthStatus that should be reported when the health check reports a failure. If the provided value is null, then Unhealthy will be reported.

tags
IEnumerable<String>

A list of tags that can be used to filter health checks.

args
Object[]

Additional arguments to provide to the constructor.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder.

Remarks

This method will use CreateInstance<T>(IServiceProvider, Object[]) to create the health check instance when needed. Additional arguments can be provided to the constructor via args.

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

Adds a new type activated health check with the specified name and implementation.

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

Type Parameters

T

The health check implementation type.

Parameters

name
String

The name of the health check.

failureStatus
Nullable<HealthStatus>

The HealthStatus that should be reported when the health check reports a failure. If the provided value is null, then Unhealthy will be reported.

tags
IEnumerable<String>

A list of tags that can be used to filter health checks.

timeout
TimeSpan

A TimeSpan representing the timeout of the check.

args
Object[]

Additional arguments to provide to the constructor.

Returns

IHealthChecksBuilder

The IHealthChecksBuilder.

Remarks

This method will use CreateInstance<T>(IServiceProvider, Object[]) to create the health check instance when needed. Additional arguments can be provided to the constructor via args.

Applies to