1 implementation of IExceptionHandler
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
591
private class TestExceptionHandler :
IExceptionHandler
20 references to IExceptionHandler
Microsoft.AspNetCore.Diagnostics (11)
ExceptionHandler\ExceptionHandledType.cs (1)
16
/// Exception was handled by an <see cref="Diagnostics.
IExceptionHandler
"/> service instance registered in the DI container.
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();
172
foreach (
var
exceptionHandler in _exceptionHandlers)
ExceptionHandler\ExceptionHandlerOptions.cs (1)
56
/// an <see cref="
IExceptionHandler
"/> service instance registered in the DI container.
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 (9)
ExceptionHandlerMiddlewareTest.cs (9)
185
var exceptionHandlers = new List<
IExceptionHandler
>
226
var exceptionHandlers = new List<
IExceptionHandler
>
260
var exceptionHandlers = new List<
IExceptionHandler
>
290
var exceptionHandlers = new List<
IExceptionHandler
>
315
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
338
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
360
var exceptionHandlers = new List<
IExceptionHandler
> { new TestExceptionHandler(true, "1") };
641
IEnumerable<
IExceptionHandler
> exceptionHandlers = null,
653
exceptionHandlers ?? Enumerable.Empty<
IExceptionHandler
>(),