RequestTimeoutsIEndpointConventionBuilderExtensions.WithRequestTimeout 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WithRequestTimeout(IEndpointConventionBuilder, RequestTimeoutPolicy)
指定端點 () 逾時原則。
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder WithRequestTimeout (this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutPolicy policy);
static member WithRequestTimeout : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder * Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutPolicy -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function WithRequestTimeout (builder As IEndpointConventionBuilder, policy As RequestTimeoutPolicy) As IEndpointConventionBuilder
參數
- builder
- IEndpointConventionBuilder
端點慣例產生器。
- policy
- RequestTimeoutPolicy
要求逾時原則。
傳回
原始慣例產生器參數。
適用於
WithRequestTimeout(IEndpointConventionBuilder, String)
指定端點 () 逾時原則。
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder WithRequestTimeout (this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, string policyName);
static member WithRequestTimeout : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function WithRequestTimeout (builder As IEndpointConventionBuilder, policyName As String) As IEndpointConventionBuilder
參數
- builder
- IEndpointConventionBuilder
端點慣例產生器。
- policyName
- String
要套用至端點 () 之原則的名稱 (不區分大小寫) 。
傳回
原始慣例產生器參數。
適用於
WithRequestTimeout(IEndpointConventionBuilder, TimeSpan)
指定端點 () 的逾時。
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder WithRequestTimeout (this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, TimeSpan timeout);
static member WithRequestTimeout : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder * TimeSpan -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function WithRequestTimeout (builder As IEndpointConventionBuilder, timeout As TimeSpan) As IEndpointConventionBuilder
參數
- builder
- IEndpointConventionBuilder
端點慣例產生器。
- timeout
- TimeSpan
要套用至端點的逾時 () 。
傳回
原始慣例產生器參數。