ExceptionFilterAttribute Classe

Definizione

Filtro astratto che viene eseguito in modo asincrono dopo che un'azione ha generato un Exceptionoggetto . Le sottoclassi devono eseguire l'override o OnExceptionAsync(ExceptionContext) non entrambeOnException(ExceptionContext).

public ref class ExceptionFilterAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Filters::IAsyncExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IExceptionFilter, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class ExceptionFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ExceptionFilterAttribute = class
    inherit Attribute
    interface IAsyncExceptionFilter
    interface IFilterMetadata
    interface IExceptionFilter
    interface IOrderedFilter
Public MustInherit Class ExceptionFilterAttribute
Inherits Attribute
Implements IAsyncExceptionFilter, IExceptionFilter, IOrderedFilter
Ereditarietà
ExceptionFilterAttribute
Attributi
Implementazioni

Costruttori

ExceptionFilterAttribute()

Filtro astratto che viene eseguito in modo asincrono dopo che un'azione ha generato un Exceptionoggetto . Le sottoclassi devono eseguire l'override o OnExceptionAsync(ExceptionContext) non entrambeOnException(ExceptionContext).

Proprietà

Order

Ottiene il valore dell'ordine per determinare l'ordine di esecuzione dei filtri. I filtri vengono eseguiti in valore numerico crescente della Order proprietà.

Metodi

OnException(ExceptionContext)

Chiamato dopo che un'azione ha generato un Exceptionoggetto .

OnExceptionAsync(ExceptionContext)

Chiamato dopo che un'azione ha generato un Exceptionoggetto .

Si applica a