Table of Contents

Class HttpContextExceptionHandlerExtensions

Namespace
MADE.Web.Extensions
Assembly
MADE.Web.dll

Defines a collection of extensions for IHttpContextExceptionHandler<TException> objects.

public static class HttpContextExceptionHandlerExtensions
Inheritance
HttpContextExceptionHandlerExtensions
Inherited Members

Methods

AddDefaultHttpContextExceptionHandler(IServiceCollection)

Adds the default Exception handlers to the service collection.

public static IServiceCollection AddDefaultHttpContextExceptionHandler(this IServiceCollection serviceCollection)

Parameters

serviceCollection IServiceCollection

The service collection.

Returns

IServiceCollection

The configured service collection.

AddHttpContextExceptionHandler<TException, THandler>(IServiceCollection)

Adds a HttpContext exception handler to the service collection.

public static IServiceCollection AddHttpContextExceptionHandler<TException, THandler>(this IServiceCollection serviceCollection) where TException : Exception where THandler : class, IHttpContextExceptionHandler<TException>

Parameters

serviceCollection IServiceCollection

The service collection.

Returns

IServiceCollection

The configured service collection.

Type Parameters

TException

The type of exception handled.

THandler

The type of exception handler.

UseHttpContextExceptionHandling(IApplicationBuilder)

Adds the IHttpContextExceptionHandler<TException> middleware to the application builder.

public static IApplicationBuilder UseHttpContextExceptionHandling(this IApplicationBuilder builder)

Parameters

builder IApplicationBuilder

The application builder.

Returns

IApplicationBuilder

The configured application builder.