1 type derived from ProblemDetailsFactory
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\DefaultProblemDetailsFactory.cs (1)
18
public sealed class DefaultProblemDetailsFactory :
ProblemDetailsFactory
20 references to ProblemDetailsFactory
Microsoft.AspNetCore.Mvc.Core (11)
ControllerBase.cs (3)
32
private
ProblemDetailsFactory
? _problemDetailsFactory;
184
public
ProblemDetailsFactory
ProblemDetailsFactory
190
_problemDetailsFactory = HttpContext?.RequestServices?.GetRequiredService<
ProblemDetailsFactory
>();
DependencyInjection\ApiBehaviorOptionsSetup.cs (3)
13
private
ProblemDetailsFactory
? _problemDetailsFactory;
23
_problemDetailsFactory ??= context.HttpContext.RequestServices.GetRequiredService<
ProblemDetailsFactory
>();
30
internal static IActionResult ProblemDetailsInvalidModelStateResponse(
ProblemDetailsFactory
problemDetailsFactory, ActionContext context)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
276
services.TryAddSingleton<
ProblemDetailsFactory
, DefaultProblemDetailsFactory>();
Infrastructure\DefaultApiProblemDetailsWriter.cs (2)
14
private readonly
ProblemDetailsFactory
_problemDetailsFactory;
26
ProblemDetailsFactory
problemDetailsFactory,
Infrastructure\ProblemDetailsClientErrorFactory.cs (2)
8
private readonly
ProblemDetailsFactory
_problemDetailsFactory;
10
public ProblemDetailsClientErrorFactory(
ProblemDetailsFactory
problemDetailsFactory)
Microsoft.AspNetCore.Mvc.Core.Test (9)
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (7)
35
var
factory = GetProblemDetailsFactory();
57
var
factory = GetProblemDetailsFactory(options => options.ClientErrorMapping[400].Link = link);
77
var
factory = Mock.Of<
ProblemDetailsFactory
>(m => m.CreateValidationProblemDetails(It.IsAny<HttpContext>(), It.IsAny<ModelStateDictionary>(), null, null, null, null, null) == new ValidationProblemDetails
102
var
factory = GetProblemDetailsFactory();
119
var
factory = GetProblemDetailsFactory();
130
private static
ProblemDetailsFactory
GetProblemDetailsFactory(Action<ApiBehaviorOptions> configure = null)
Infrastructure\ProblemDetailsFactoryTest.cs (2)
13
private readonly
ProblemDetailsFactory
Factory = GetProblemDetails();
180
private static
ProblemDetailsFactory
GetProblemDetails()