ConnectionTimeoutExtensions.AddConnectionTimeout 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddConnectionTimeout(IServiceCollection, IConfigurationSection) |
为连接超时中间件添加选项处理。 |
AddConnectionTimeout(IServiceCollection, Action<ConnectionTimeoutOptions>) |
为连接超时中间件添加选项处理。 |
AddConnectionTimeout(IServiceCollection, IConfigurationSection)
为连接超时中间件添加选项处理。
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddConnectionTimeout (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddConnectionTimeout : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddConnectionTimeout (services As IServiceCollection, section As IConfigurationSection) As IServiceCollection
参数
- services
- IServiceCollection
要向其添加服务的依赖项注入容器。
- section
- IConfigurationSection
用于配置功能的配置节。
返回
services
的值。
适用于
AddConnectionTimeout(IServiceCollection, Action<ConnectionTimeoutOptions>)
为连接超时中间件添加选项处理。
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddConnectionTimeout (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Connections.ConnectionTimeoutOptions> configure);
static member AddConnectionTimeout : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Connections.ConnectionTimeoutOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddConnectionTimeout (services As IServiceCollection, configure As Action(Of ConnectionTimeoutOptions)) As IServiceCollection
参数
- services
- IServiceCollection
要向其添加服务的依赖项注入容器。
- configure
- Action<ConnectionTimeoutOptions>
委托以配置超时选项。
返回
services
的值。