C# Класс NSwag.AspNetCore.JsonExceptionFilterAttribute

Handles thrown exceptions from action methods and serializes them with the correct HTTP status code.
Наследование: ActionFilterAttribute
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetStatusCode ( Exception exception, ActionExecutedContext context ) : int

Описание методов

JsonExceptionFilterAttribute() публичный Метод

Initializes a new instance of the JsonExceptionFilterAttribute class.
public JsonExceptionFilterAttribute ( ) : System
Результат System

JsonExceptionFilterAttribute() публичный Метод

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').
Результат System

JsonExceptionFilterAttribute() публичный Метод

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.
Результат System

OnActionExecuted() публичный Метод

Occurs after the action method is invoked.
public OnActionExecuted ( ActionExecutedContext context ) : void
context ActionExecutedContext The action executed context.
Результат void