共用方式為


RouteShortCircuitEndpointConventionBuilderExtensions.ShortCircuit 方法

定義

縮短端點 () 。 端點的執行會在 UseRouting 中介軟體中發生,而不是 UseEndpoint。

public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder ShortCircuit (this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, int? statusCode = default);
static member ShortCircuit : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder * Nullable<int> -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function ShortCircuit (builder As IEndpointConventionBuilder, Optional statusCode As Nullable(Of Integer) = Nothing) As IEndpointConventionBuilder

參數

builder
IEndpointConventionBuilder

端點慣例產生器。

statusCode
Nullable<Int32>

回應中要設定的狀態碼。

傳回

原始慣例產生器參數。

適用於