1 implementation of IExceptionHandler
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
463
private class TestExceptionHandler :
IExceptionHandler
17 references to IExceptionHandler
Microsoft.AspNetCore.Diagnostics (9)
ExceptionHandler\ExceptionHandlerExtensions.cs (1)
120
var exceptionHandlers = app.ApplicationServices.GetRequiredService<IEnumerable<
IExceptionHandler
>>();
ExceptionHandler\ExceptionHandlerMiddleware.cs (1)
38
Enumerable.Empty<
IExceptionHandler
>(),
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (5)
29
private readonly
IExceptionHandler
[] _exceptionHandlers;
38
IEnumerable<
IExceptionHandler
> exceptionHandlers,
47
_exceptionHandlers = exceptionHandlers as
IExceptionHandler
[] ?? new List<
IExceptionHandler
>(exceptionHandlers).ToArray();
173
foreach (
var
exceptionHandler in _exceptionHandlers)
ExceptionHandler\ExceptionHandlerServiceCollectionExtensions.cs (2)
51
public static IServiceCollection AddExceptionHandler<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(this IServiceCollection services) where T : class,
IExceptionHandler
53
return services.AddSingleton<
IExceptionHandler
, T>();
Microsoft.AspNetCore.Diagnostics.Tests (8)
ExceptionHandlerMiddlewareTest.cs (8)
133
var exceptionHandlers = new List<
IExceptionHandler
>
158
var exceptionHandlers = new List<
IExceptionHandler
>
188
var exceptionHandlers = new List<
IExceptionHandler
>
213
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
236
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
258
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
508
IEnumerable<
IExceptionHandler
> exceptionHandlers = null,
519
exceptionHandlers ?? Enumerable.Empty<
IExceptionHandler
>(),