1 implementation of IProblemDetailsService
Microsoft.AspNetCore.Http.Extensions (1)
ProblemDetailsService.cs (1)
8internal sealed class ProblemDetailsService : IProblemDetailsService
22 references to IProblemDetailsService
Microsoft.AspNetCore.Diagnostics (8)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
43private readonly IProblemDetailsService? _problemDetailsService; 54IProblemDetailsService? problemDetailsService = null)
ExceptionHandler\ExceptionHandlerExtensions.cs (2)
109var problemDetailsService = app.ApplicationServices.GetService<IProblemDetailsService>();
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
31private readonly IProblemDetailsService? _problemDetailsService; 40IProblemDetailsService? problemDetailsService = null)
StatusCodePage\StatusCodePagesOptions.cs (2)
26var problemDetailsService = context.HttpContext.RequestServices.GetService<IProblemDetailsService>();
Microsoft.AspNetCore.Http.Extensions (2)
ProblemDetailsOptions.cs (1)
7/// Options for controlling the behavior of <see cref="IProblemDetailsService.WriteAsync(ProblemDetailsContext)"/>
ProblemDetailsServiceCollectionExtensions.cs (1)
41services.TryAddSingleton<IProblemDetailsService, ProblemDetailsService>();
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsServiceCollectionExtensionsTest.cs (6)
28Assert.Single(collection, (sd) => sd.ServiceType == typeof(IProblemDetailsService) && sd.ImplementationType == typeof(ProblemDetailsService)); 44Assert.Single(collection, (sd) => sd.ServiceType == typeof(IProblemDetailsService) && sd.ImplementationType == typeof(ProblemDetailsService)); 74var customService = Mock.Of<IProblemDetailsService>(); 75collection.AddSingleton(typeof(IProblemDetailsService), customService); 81var service = Assert.Single(collection, (sd) => sd.ServiceType == typeof(IProblemDetailsService));
Microsoft.AspNetCore.Http.Results (4)
ProblemHttpResult.cs (2)
55var problemDetailsService = httpContext.RequestServices.GetService<IProblemDetailsService>();
ValidationProblem.cs (2)
58var problemDetailsService = httpContext.RequestServices.GetService<IProblemDetailsService>();
Microsoft.AspNetCore.Mvc.Core (2)
Formatters\TextOutputFormatter.cs (1)
133if (context.HttpContext.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)
Infrastructure\ObjectResultExecutor.cs (1)
104if (context.HttpContext.RequestServices.GetService<IProblemDetailsService>() is { } problemDetailsService)