35 instantiations of ProblemDetailsContext
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
228if (_problemDetailsService == null || !await _problemDetailsService.TryWriteAsync(new()
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
191handled = await _problemDetailsService!.TryWriteAsync(new()
StatusCodePage\StatusCodePagesOptions.cs (1)
29!await problemDetailsService.TryWriteAsync(new() { HttpContext = context.HttpContext, ProblemDetails = { Status = statusCode } }))
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
ProblemDetailsContextTests.cs (1)
15ProblemDetailsContext context = new() { HttpContext = new DefaultHttpContext() };
Microsoft.AspNetCore.Http.Extensions.Tests (21)
ProblemDetailsDefaultWriterTest.cs (18)
38var problemDetailsContext = new ProblemDetailsContext() 76var problemDetailsContext = new ProblemDetailsContext() 108var problemDetailsContext = new ProblemDetailsContext() 141var problemDetailsContext = new ProblemDetailsContext() 183var problemDetailsContext = new ProblemDetailsContext() 223var problemDetailsContext = new ProblemDetailsContext() 262var problemDetailsContext = new ProblemDetailsContext() 305var problemDetailsContext = new ProblemDetailsContext() 348var problemDetailsContext = new ProblemDetailsContext() 391var problemDetailsContext = new ProblemDetailsContext() 434var problemDetailsContext = new ProblemDetailsContext() 468var problemDetailsContext = new ProblemDetailsContext() 514var problemDetailsContext = new ProblemDetailsContext() 555await writer.WriteAsync(new ProblemDetailsContext() { HttpContext = context }); 587await writer.WriteAsync(new ProblemDetailsContext() 619await writer.WriteAsync(new ProblemDetailsContext() 650var result = writer.CanWrite(new() { HttpContext = context }); 667var result = writer.CanWrite(new() { HttpContext = context });
ProblemDetailsServiceTest.cs (3)
56var result = await service.TryWriteAsync(new() { HttpContext = context, AdditionalMetadata = metadata }); 106var result = await service.TryWriteAsync(new() { HttpContext = context }); 126var result = await service.TryWriteAsync(new() { HttpContext = context });
Microsoft.AspNetCore.Http.Results (2)
ProblemHttpResult.cs (1)
63if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails }))
ValidationProblem.cs (1)
63if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails }))
Microsoft.AspNetCore.Mvc.Core (3)
Formatters\TextOutputFormatter.cs (1)
135return problemDetailsService.TryWriteAsync(new ()
Infrastructure\DefaultProblemDetailsFactory.cs (1)
111_configure?.Invoke(new() { HttpContext = httpContext!, ProblemDetails = problemDetails });
Infrastructure\ObjectResultExecutor.cs (1)
106return problemDetailsService.TryWriteAsync(new()
Microsoft.AspNetCore.Mvc.Core.Test (5)
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (5)
34var problemDetailsContext = new ProblemDetailsContext() 71var problemDetailsContext = new ProblemDetailsContext() 104var problemDetailsContext = new ProblemDetailsContext() 130var result = writer.CanWrite(new() { HttpContext = context }); 145var result = writer.CanWrite(new() { HttpContext = context });
37 references to ProblemDetailsContext
Microsoft.AspNetCore.Http.Abstractions (9)
ProblemDetails\IProblemDetailsService.cs (4)
16/// <param name="context">The <see cref="ProblemDetailsContext"/> associated with the current request/response.</param> 25ValueTask WriteAsync(ProblemDetailsContext context); 31/// <param name="context">The <see cref="ProblemDetailsContext"/> associated with the current request/response.</param> 39async ValueTask<bool> TryWriteAsync(ProblemDetailsContext context)
ProblemDetails\IProblemDetailsWriter.cs (5)
15/// <param name="context">The <see cref="ProblemDetailsContext"/> associated with the current request/response.</param> 16ValueTask WriteAsync(ProblemDetailsContext context); 21/// <param name="context">The <see cref="ProblemDetailsContext"/> associated with the current request/response.</param> 22/// <returns>Flag that indicates if that the writer can write to the current <see cref="ProblemDetailsContext"/>.</returns> 23bool CanWrite(ProblemDetailsContext context);
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
ProblemDetailsContextTests.cs (1)
15ProblemDetailsContext context = new() { HttpContext = new DefaultHttpContext() };
Microsoft.AspNetCore.Http.Extensions (6)
DefaultProblemDetailsWriter.cs (2)
26public bool CanWrite(ProblemDetailsContext context) 53public ValueTask WriteAsync(ProblemDetailsContext context)
ProblemDetailsOptions.cs (2)
7/// Options for controlling the behavior of <see cref="IProblemDetailsService.WriteAsync(ProblemDetailsContext)"/> 15public Action<ProblemDetailsContext>? CustomizeProblemDetails { get; set; }
ProblemDetailsService.cs (2)
18public async ValueTask WriteAsync(ProblemDetailsContext context) 26public async ValueTask<bool> TryWriteAsync(ProblemDetailsContext context)
Microsoft.AspNetCore.Http.Extensions.Tests (15)
ProblemDetailsDefaultWriterTest.cs (13)
38var problemDetailsContext = new ProblemDetailsContext() 76var problemDetailsContext = new ProblemDetailsContext() 108var problemDetailsContext = new ProblemDetailsContext() 141var problemDetailsContext = new ProblemDetailsContext() 183var problemDetailsContext = new ProblemDetailsContext() 223var problemDetailsContext = new ProblemDetailsContext() 262var problemDetailsContext = new ProblemDetailsContext() 305var problemDetailsContext = new ProblemDetailsContext() 348var problemDetailsContext = new ProblemDetailsContext() 391var problemDetailsContext = new ProblemDetailsContext() 434var problemDetailsContext = new ProblemDetailsContext() 468var problemDetailsContext = new ProblemDetailsContext() 514var problemDetailsContext = new ProblemDetailsContext()
ProblemDetailsServiceTest.cs (2)
155public bool CanWrite(ProblemDetailsContext context) 164public ValueTask WriteAsync(ProblemDetailsContext context)
Microsoft.AspNetCore.Mvc.Core (3)
Infrastructure\DefaultApiProblemDetailsWriter.cs (2)
35public bool CanWrite(ProblemDetailsContext context) 43public ValueTask WriteAsync(ProblemDetailsContext context)
Infrastructure\DefaultProblemDetailsFactory.cs (1)
21private readonly Action<ProblemDetailsContext>? _configure;
Microsoft.AspNetCore.Mvc.Core.Test (3)
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (3)
34var problemDetailsContext = new ProblemDetailsContext() 71var problemDetailsContext = new ProblemDetailsContext() 104var problemDetailsContext = new ProblemDetailsContext()