Dela via


RouteShortCircuitEndpointRouteBuilderExtensions.MapShortCircuit Method

Definition

Adds a RouteEndpoint to the IEndpointRouteBuilder that matches HTTP requests (all verbs) for the specified prefixes.

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

Parameters

builder
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

statusCode
Int32

The status code to set in the response.

routePrefixes
String[]

An array of route prefixes to be short circuited.

Returns

A IEndpointConventionBuilder that can be used to further customize the endpoint.

Applies to