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