HealthChecksBuilderDelegateExtensions.AddCheck Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>) |
Adds a new health check with the specified name and implementation. |
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>) |
Adds a new health check with the specified name and implementation. |
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>) |
Adds a new health check with the specified name and implementation. |
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>) |
Adds a new health check with the specified name and implementation. |
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>)
Adds a new health check with the specified name and implementation.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, Func<Microsoft::Extensions::Diagnostics::HealthChecks::HealthCheckResult> ^ check, System::Collections::Generic::IEnumerable<System::String ^> ^ tags);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> check, System.Collections.Generic.IEnumerable<string> tags);
static member AddCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> * seq<string> -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder
<Extension()>
Public Function AddCheck (builder As IHealthChecksBuilder, name As String, check As Func(Of HealthCheckResult), tags As IEnumerable(Of String)) As IHealthChecksBuilder
Parameters
- builder
- IHealthChecksBuilder
The IHealthChecksBuilder.
- name
- String
The name of the health check.
- check
- Func<HealthCheckResult>
A delegate that provides the health check implementation.
- tags
- IEnumerable<String>
A list of tags that can be used to filter health checks.
Returns
The IHealthChecksBuilder.
Applies to
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>)
Adds a new health check with the specified name and implementation.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ AddCheck(Microsoft::Extensions::DependencyInjection::IHealthChecksBuilder ^ builder, System::String ^ name, Func<System::Threading::CancellationToken, Microsoft::Extensions::Diagnostics::HealthChecks::HealthCheckResult> ^ check, System::Collections::Generic::IEnumerable<System::String ^> ^ tags);
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Func<System.Threading.CancellationToken,Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> check, System.Collections.Generic.IEnumerable<string>? tags);
static member AddCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Func<System.Threading.CancellationToken, Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> * seq<string> -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder
<Extension()>
Public Function AddCheck (builder As IHealthChecksBuilder, name As String, check As Func(Of CancellationToken, HealthCheckResult), tags As IEnumerable(Of String)) As IHealthChecksBuilder
Parameters
- builder
- IHealthChecksBuilder
The IHealthChecksBuilder.
- name
- String
The name of the health check.
A delegate that provides the health check implementation.
- tags
- IEnumerable<String>
A list of tags that can be used to filter health checks.
Returns
The IHealthChecksBuilder.
Applies to
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>)
Adds a new health check with the specified name and implementation.
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> check, System.Collections.Generic.IEnumerable<string>? tags = default, TimeSpan? timeout = default);
static member AddCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Func<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> * seq<string> * Nullable<TimeSpan> -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder
<Extension()>
Public Function AddCheck (builder As IHealthChecksBuilder, name As String, check As Func(Of HealthCheckResult), Optional tags As IEnumerable(Of String) = Nothing, Optional timeout As Nullable(Of TimeSpan) = Nothing) As IHealthChecksBuilder
Parameters
- builder
- IHealthChecksBuilder
The IHealthChecksBuilder.
- name
- String
The name of the health check.
- check
- Func<HealthCheckResult>
A delegate that provides the health check implementation.
- tags
- IEnumerable<String>
A list of tags that can be used to filter health checks.
Returns
The IHealthChecksBuilder.
Applies to
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>)
Adds a new health check with the specified name and implementation.
public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck (this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Func<System.Threading.CancellationToken,Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> check, System.Collections.Generic.IEnumerable<string>? tags = default, TimeSpan? timeout = default);
static member AddCheck : Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder * string * Func<System.Threading.CancellationToken, Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult> * seq<string> * Nullable<TimeSpan> -> Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder
<Extension()>
Public Function AddCheck (builder As IHealthChecksBuilder, name As String, check As Func(Of CancellationToken, HealthCheckResult), Optional tags As IEnumerable(Of String) = Nothing, Optional timeout As Nullable(Of TimeSpan) = Nothing) As IHealthChecksBuilder
Parameters
- builder
- IHealthChecksBuilder
The IHealthChecksBuilder.
- name
- String
The name of the health check.
A delegate that provides the health check implementation.
- tags
- IEnumerable<String>
A list of tags that can be used to filter health checks.
Returns
The IHealthChecksBuilder.