共用方式為


RouteShortCircuitEndpointRouteBuilderExtensions.MapShortCircuit 方法

定義

RouteEndpoint將 加入符合 HTTP 要求的 , IEndpointRouteBuilder (指定前置詞的所有動詞) 。

public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapShortCircuit (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder builder, int statusCode, params string[] routePrefixes);
static member MapShortCircuit : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * int * string[] -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapShortCircuit (builder As IEndpointRouteBuilder, statusCode As Integer, ParamArray routePrefixes As String()) As IEndpointConventionBuilder

參數

builder
IEndpointRouteBuilder

IEndpointRouteBuilder要加入路由的 。

statusCode
Int32

回應中要設定的狀態碼。

routePrefixes
String[]

要縮短的路由前置詞陣列。

傳回

IEndpointConventionBuilder,可用來進一步自訂端點。

適用於