Class HttpContextExceptionHandlerExtensions
Defines a collection of extensions for IHttpContextExceptionHandler<TException> objects.
Inheritance
System.Object
HttpContextExceptionHandlerExtensions
Namespace: MADE.Web.Extensions
Assembly: MADE.Web.dll
Syntax
public static class HttpContextExceptionHandlerExtensions : object
Methods
| Improve this Doc View SourceAddDefaultHttpContextExceptionHandler(IServiceCollection)
Adds the default
Declaration
public static IServiceCollection AddDefaultHttpContextExceptionHandler(this IServiceCollection serviceCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | serviceCollection | The service collection. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured service collection. |
AddHttpContextExceptionHandler<TException, THandler>(IServiceCollection)
Adds a
Declaration
public static IServiceCollection AddHttpContextExceptionHandler<TException, THandler>(this IServiceCollection serviceCollection)
where TException : Exception where THandler : class, IHttpContextExceptionHandler<TException>
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | serviceCollection | The service collection. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured service collection. |
Type Parameters
| Name | Description |
|---|---|
| TException | The type of exception handled. |
| THandler | The type of exception handler. |
UseHttpContextExceptionHandling(IApplicationBuilder)
Adds the IHttpContextExceptionHandler<TException> middleware to the application builder.
Declaration
public static IApplicationBuilder UseHttpContextExceptionHandling(this IApplicationBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IApplicationBuilder | builder | The application builder. |
Returns
| Type | Description |
|---|---|
| IApplicationBuilder | The configured application builder. |