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