RequestTimeoutsIServiceCollectionExtensions.AddRequestTimeouts 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddRequestTimeouts(IServiceCollection) |
添加请求超时服务。 |
AddRequestTimeouts(IServiceCollection, Action<RequestTimeoutOptions>) |
添加请求超时服务并配置相关选项。 |
AddRequestTimeouts(IServiceCollection)
添加请求超时服务。
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestTimeouts (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddRequestTimeouts : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRequestTimeouts (services As IServiceCollection) As IServiceCollection
参数
- services
- IServiceCollection
IServiceCollection用于添加服务的 。
返回
适用于
AddRequestTimeouts(IServiceCollection, Action<RequestTimeoutOptions>)
添加请求超时服务并配置相关选项。
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestTimeouts (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions> configure);
static member AddRequestTimeouts : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRequestTimeouts (services As IServiceCollection, configure As Action(Of RequestTimeoutOptions)) As IServiceCollection
参数
- services
- IServiceCollection
IServiceCollection用于添加服务的 。
- configure
- Action<RequestTimeoutOptions>
用于配置 RequestTimeoutOptions 的委托。