HealthChecksBuilderDelegateExtensions.AddCheck 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>)
添加具有指定名称和实现的新运行状况检查。
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
参数
- name
- String
运行状况检查的名称。
- check
- Func<HealthCheckResult>
提供运行状况检查实现的委托。
- tags
- IEnumerable<String>
可用于筛选运行状况检查的标记的列表。
返回
适用于
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>)
添加具有指定名称和实现的新运行状况检查。
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
参数
- name
- String
运行状况检查的名称。
提供运行状况检查实现的委托。
- tags
- IEnumerable<String>
可用于筛选运行状况检查的标记的列表。
返回
适用于
AddCheck(IHealthChecksBuilder, String, Func<HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>)
添加具有指定名称和实现的新运行状况检查。
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
参数
- name
- String
运行状况检查的名称。
- check
- Func<HealthCheckResult>
提供运行状况检查实现的委托。
- tags
- IEnumerable<String>
可用于筛选运行状况检查的标记的列表。
返回
适用于
AddCheck(IHealthChecksBuilder, String, Func<CancellationToken,HealthCheckResult>, IEnumerable<String>, Nullable<TimeSpan>)
添加具有指定名称和实现的新运行状况检查。
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
参数
- name
- String
运行状况检查的名称。
提供运行状况检查实现的委托。
- tags
- IEnumerable<String>
可用于筛选运行状况检查的标记的列表。