Language

ShortCircuitAttribute Class

Definition

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

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class ShortCircuitAttribute : Attribute, Microsoft.AspNetCore.Routing.IShortCircuitMetadata
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type ShortCircuitAttribute = class
    inherit Attribute
    interface IShortCircuitMetadata
Public NotInheritable Class ShortCircuitAttribute
Inherits Attribute
Implements IShortCircuitMetadata
Inheritance
ShortCircuitAttribute
Attributes
Implements

Constructors

Name Description
ShortCircuitAttribute()

Constructs an instance of ShortCircuitAttribute.

ShortCircuitAttribute(Int32)

Constructs an instance of ShortCircuitAttribute.

Properties

Name Description
StatusCode

The status code to set in the response.

Applies to