C# Class NSwag.AspNetCore.JsonExceptionFilterAttribute

Handles thrown exceptions from action methods and serializes them with the correct HTTP status code.
Inheritance: ActionFilterAttribute
Afficher le fichier Open project: NSwag/NSwag

Méthodes publiques

Méthode Description
JsonExceptionFilterAttribute ( ) : System

Initializes a new instance of the JsonExceptionFilterAttribute class.

JsonExceptionFilterAttribute ( bool hideStackTrace ) : System

Initializes a new instance of the JsonExceptionFilterAttribute class.

JsonExceptionFilterAttribute ( bool hideStackTrace, Assembly>.IDictionary searchedNamespaces ) : System

Initializes a new instance of the JsonExceptionFilterAttribute class.

OnActionExecuted ( ActionExecutedContext context ) : void

Occurs after the action method is invoked.

Private Methods

Méthode Description
GetStatusCode ( Exception exception, ActionExecutedContext context ) : int

Method Details

JsonExceptionFilterAttribute() public méthode

Initializes a new instance of the JsonExceptionFilterAttribute class.
public JsonExceptionFilterAttribute ( ) : System
Résultat System

JsonExceptionFilterAttribute() public méthode

Initializes a new instance of the JsonExceptionFilterAttribute class.
public JsonExceptionFilterAttribute ( bool hideStackTrace ) : System
hideStackTrace bool If set to true the serializer hides stack trace (i.e. sets the StackTrace to 'HIDDEN').
Résultat System

JsonExceptionFilterAttribute() public méthode

Initializes a new instance of the JsonExceptionFilterAttribute class.
public JsonExceptionFilterAttribute ( bool hideStackTrace, Assembly>.IDictionary searchedNamespaces ) : System
hideStackTrace bool If set to true the serializer hides stack trace (i.e. sets the StackTrace to 'HIDDEN').
searchedNamespaces Assembly>.IDictionary The namespaces and assemblies to search for exception types.
Résultat System

OnActionExecuted() public méthode

Occurs after the action method is invoked.
public OnActionExecuted ( ActionExecutedContext context ) : void
context ActionExecutedContext The action executed context.
Résultat void