RouteShortCircuitEndpointRouteBuilderExtensions.MapShortCircuit 方法

定义

RouteEndpoint IEndpointRouteBuilder将 添加到与指定前缀) 的所有谓词 (HTTP 请求匹配的 。

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 进一步自定义终结点的 。

适用于