RouteShortCircuitEndpointRouteBuilderExtensions.MapShortCircuit 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
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,可用來進一步自訂端點。