Table of Contents

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

httpRequestDelegate RequestDelegate

The request delegate for processing a HTTP request.

hostEnvironment IHostEnvironment

The host environment.

serviceProvider IServiceProvider

The service provider.

defaultExceptionHandler IHttpContextExceptionHandler<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

context HttpContext

The HttpContext to make a request with.

Returns

Task

An asynchronous operation.