15 instantiations of ExceptionHandlerOptions
ExceptionHandlerSample (1)
StartupWithProblemDetails.cs (1)
30throwApp.UseExceptionHandler(new ExceptionHandlerOptions
Microsoft.AspNetCore.Diagnostics (3)
ExceptionHandler\ExceptionHandlerExtensions.cs (3)
44return app.UseExceptionHandler(new ExceptionHandlerOptions 62return app.UseExceptionHandler(new ExceptionHandlerOptions 85return app.UseExceptionHandler(new ExceptionHandlerOptions
Microsoft.AspNetCore.Diagnostics.Tests (11)
ExceptionHandlerMiddlewareTest.cs (3)
320app.UseExceptionHandler(new ExceptionHandlerOptions 383app.UseExceptionHandler(new ExceptionHandlerOptions 496var options = new ExceptionHandlerOptions()
ExceptionHandlerTest.cs (8)
670app.UseExceptionHandler(new ExceptionHandlerOptions 705app.UseExceptionHandler(new ExceptionHandlerOptions 850app.UseExceptionHandler(new ExceptionHandlerOptions() 956app.UseExceptionHandler(new ExceptionHandlerOptions() 1008app.UseExceptionHandler(new ExceptionHandlerOptions() 1063app.UseExceptionHandler(new ExceptionHandlerOptions() 1078app.UseExceptionHandler(new ExceptionHandlerOptions() 1141app.UseExceptionHandler(new ExceptionHandlerOptions()
19 references to ExceptionHandlerOptions
Microsoft.AspNetCore.Diagnostics (14)
ExceptionHandler\ExceptionHandlerExtensions.cs (3)
98public static IApplicationBuilder UseExceptionHandler(this IApplicationBuilder app, ExceptionHandlerOptions options) 107private static IApplicationBuilder SetExceptionHandlerMiddleware(IApplicationBuilder app, IOptions<ExceptionHandlerOptions>? options) 125options = app.ApplicationServices.GetRequiredService<IOptions<ExceptionHandlerOptions>>();
ExceptionHandler\ExceptionHandlerMiddleware.cs (1)
30IOptions<ExceptionHandlerOptions> options,
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (5)
25private readonly ExceptionHandlerOptions _options; 36IOptions<ExceptionHandlerOptions> options, 217edi = ExceptionDispatchInfo.Capture(new InvalidOperationException($"The exception handler configured on {nameof(ExceptionHandlerOptions)} produced a 404 status response. " + 218$"This {nameof(InvalidOperationException)} containing the original exception was thrown since this is often due to a misconfigured {nameof(ExceptionHandlerOptions.ExceptionHandlingPath)}. " + 219$"If the exception handler is expected to return 404 status responses then set {nameof(ExceptionHandlerOptions.AllowStatusCode404Response)} to true.", edi.SourceException));
ExceptionHandler\ExceptionHandlerServiceCollectionExtensions.cs (5)
19/// <param name="configureOptions">A delegate to configure the <see cref="ExceptionHandlerOptions"/>.</param> 21public static IServiceCollection AddExceptionHandler(this IServiceCollection services, Action<ExceptionHandlerOptions> configureOptions) 33/// <param name="configureOptions">A delegate to configure the <see cref="ExceptionHandlerOptions"/>.</param> 35public static IServiceCollection AddExceptionHandler<TService>(this IServiceCollection services, Action<ExceptionHandlerOptions, TService> configureOptions) where TService : class 40services.AddOptions<ExceptionHandlerOptions>().Configure(configureOptions);
Microsoft.AspNetCore.Diagnostics.Tests (5)
ExceptionHandlerMiddlewareTest.cs (4)
491private IOptions<ExceptionHandlerOptions> CreateOptionsAccessor( 496var options = new ExceptionHandlerOptions() 501var optionsAccessor = Mock.Of<IOptions<ExceptionHandlerOptions>>(o => o.Value == options); 507IOptions<ExceptionHandlerOptions> options,
ExceptionHandlerTest.cs (1)
619services.Configure<ExceptionHandlerOptions>(options =>