C# Класс NSwag.AspNet.WebApi.JsonExceptionFilterAttribute

Handles thrown exceptions from action methods and serializes them with the correct HTTP status code.
Наследование: System.Web.Http.Filters.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 ( System.Web.Http.Filters.HttpActionExecutedContext context ) : void

Occurs after the action method is invoked.

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

Метод Описание
GetStatusCode ( Exception exception, System.Web.Http.Filters.HttpActionExecutedContext 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 ( System.Web.Http.Filters.HttpActionExecutedContext context ) : void
context System.Web.Http.Filters.HttpActionExecutedContext The action executed context.
Результат void