HealthCheckApplicationBuilderExtensions.UseHealthChecks 方法

定义

重载

UseHealthChecks(IApplicationBuilder, PathString)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString, Int32)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString, String)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString, Int32, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString, String, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

UseHealthChecks(IApplicationBuilder, PathString)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 path 设置为 null 或 空字符串,则运行状况检查中间件将忽略 URL 路径并处理所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

运行状况检查中间件将使用 中的默认设置 IOptions<TOptions>

适用于

UseHealthChecks(IApplicationBuilder, PathString, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path, Microsoft::AspNetCore::Diagnostics::HealthChecks::HealthCheckOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString, options As HealthCheckOptions) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

options
HealthCheckOptions

用于 HealthCheckOptions 配置中间件的 。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 path 设置为 null 或 空字符串,则运行状况检查中间件将忽略 URL 路径并处理所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

适用于

UseHealthChecks(IApplicationBuilder, PathString, Int32)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path, int port);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, int port);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * int -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString, port As Integer) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

port
Int32

要在其上侦听的端口。 必须是服务器侦听的本地端口。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 设置为 null 或空字符串,则运行状况检查中间件将忽略 URL 路径并处理指定端口 path 上的所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

运行状况检查中间件将使用 中的默认设置 IOptions<TOptions>

适用于

UseHealthChecks(IApplicationBuilder, PathString, String)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path, System::String ^ port);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, string port);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString, port As String) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

port
String

要在其上侦听的端口。 必须是服务器侦听的本地端口。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 设置为 null 或空字符串,则运行状况检查中间件将忽略 URL 路径并处理指定端口 path 上的所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

运行状况检查中间件将使用 中的默认设置 IOptions<TOptions>

适用于

UseHealthChecks(IApplicationBuilder, PathString, Int32, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path, int port, Microsoft::AspNetCore::Diagnostics::HealthChecks::HealthCheckOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, int port, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * int * Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString, port As Integer, options As HealthCheckOptions) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

port
Int32

要在其上侦听的端口。 必须是服务器侦听的本地端口。

options
HealthCheckOptions

用于 HealthCheckOptions 配置中间件的 。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 设置为 null 或空字符串,则运行状况检查中间件将忽略 URL 路径并处理指定端口 path 上的所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

适用于

UseHealthChecks(IApplicationBuilder, PathString, String, HealthCheckOptions)

添加提供运行状况检查状态的中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHealthChecks(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Http::PathString path, System::String ^ port, Microsoft::AspNetCore::Diagnostics::HealthChecks::HealthCheckOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, string port, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options);
static member UseHealthChecks : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Http.PathString * string * Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHealthChecks (app As IApplicationBuilder, path As PathString, port As String, options As HealthCheckOptions) As IApplicationBuilder

参数

path
PathString

要提供运行状况检查状态的路径。

port
String

要在其上侦听的端口。 必须是服务器侦听的本地端口。

options
HealthCheckOptions

用于 HealthCheckOptions 配置中间件的 。

返回

IApplicationBuilder

操作完成后对 app 的引用。

注解

如果 设置为 null 或空字符串,则运行状况检查中间件将忽略 URL 路径并处理指定端口 path 上的所有请求。 如果 设置为非空值,运行状况检查中间件将处理 URL 与提供的不区分大小写的值匹配的请求,从而允许额外的尾部斜杠 path path (/') 字符。

适用于