Class HttpContextExceptionsMiddleware
- Namespace
- MADE.Web.Exceptions
- Assembly
- MADE.Web.dll
Defines a middleware for handling JSON exceptions.
public class HttpContextExceptionsMiddleware
- Inheritance
-
HttpContextExceptionsMiddleware
- Inherited Members
- Extension Methods
Constructors
HttpContextExceptionsMiddleware(RequestDelegate, IHostEnvironment, IServiceProvider, IHttpContextExceptionHandler<Exception>)
Initializes a new instance of the HttpContextExceptionsMiddleware class.
public HttpContextExceptionsMiddleware(RequestDelegate httpRequestDelegate, IHostEnvironment hostEnvironment, IServiceProvider serviceProvider, IHttpContextExceptionHandler<Exception> defaultExceptionHandler)
Parameters
httpRequestDelegateRequestDelegateThe request delegate for processing a HTTP request.
hostEnvironmentIHostEnvironmentThe host environment.
serviceProviderIServiceProviderThe service provider.
defaultExceptionHandlerIHttpContextExceptionHandler<Exception>The default exception handler.
Methods
Invoke(HttpContext)
Invokes the middleware to perform the request and handle any exceptions thrown.
public Task Invoke(HttpContext context)
Parameters
contextHttpContextThe HttpContext to make a request with.
Returns
- Task
An asynchronous operation.