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,可用來進一步自訂端點。
產品 | 版本 |
---|---|
ASP.NET Core | 8.0, 9.0 |