RouteShortCircuitEndpointConventionBuilderExtensions.ShortCircuit Method

Definition

Short circuit the endpoint(s). The execution of the endpoint will happen in UseRouting middleware instead of UseEndpoint.

public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder ShortCircuit (this Microsoft.AspNetCore.Builder.IEndpointConventionBuilder builder, int? statusCode = default);
static member ShortCircuit : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder * Nullable<int> -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function ShortCircuit (builder As IEndpointConventionBuilder, Optional statusCode As Nullable(Of Integer) = Nothing) As IEndpointConventionBuilder

Parameters

builder
IEndpointConventionBuilder

The endpoint convention builder.

statusCode
Nullable<Int32>

The status code to set in the response.

Returns

The original convention builder parameter.

Applies to