1 write to ProblemDetails
Microsoft.AspNetCore.Http.Results (1)
ProblemHttpResult.cs (1)
23ProblemDetails = problemDetails;
79 references to ProblemDetails
Microsoft.AspNetCore.Http.Results (8)
ProblemHttpResult.cs (8)
20/// <param name="problemDetails">The <see cref="ProblemDetails"/> instance to format in the entity body.</param> 24ProblemDetailsDefaults.Apply(ProblemDetails, statusCode: null); 28/// Gets the <see cref="ProblemDetails"/> instance. 32object? IValueHttpResult.Value => ProblemDetails; 34ProblemDetails? IValueHttpResult<ProblemDetails>.Value => ProblemDetails; 44public int StatusCode => ProblemDetails.Status!.Value; 63if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails })) 68value: ProblemDetails,
Microsoft.AspNetCore.Http.Results.Tests (71)
ResultsTests.cs (46)
1262Assert.Equal(detail, result.ProblemDetails.Detail); 1263Assert.Equal(instance, result.ProblemDetails.Instance); 1266Assert.Equal(title, result.ProblemDetails.Title); 1267Assert.Equal(type, result.ProblemDetails.Type); 1268Assert.Equal(extensions, result.ProblemDetails.Extensions); 1286Assert.Equal(detail, result.ProblemDetails.Detail); 1287Assert.Equal(instance, result.ProblemDetails.Instance); 1290Assert.Equal(title, result.ProblemDetails.Title); 1291Assert.Equal(type, result.ProblemDetails.Type); 1292Assert.Equal(extensions, result.ProblemDetails.Extensions); 1310Assert.Equal(detail, result.ProblemDetails.Detail); 1311Assert.Equal(instance, result.ProblemDetails.Instance); 1314Assert.Equal(title, result.ProblemDetails.Title); 1315Assert.Equal(type, result.ProblemDetails.Type); 1316Assert.Equal(extensions, result.ProblemDetails.Extensions); 1331Assert.Null(result.ProblemDetails.Detail); 1332Assert.Null(result.ProblemDetails.Instance); 1335Assert.Equal(title, result.ProblemDetails.Title); 1336Assert.Equal(type, result.ProblemDetails.Type); 1337Assert.NotNull(result.ProblemDetails.Extensions); 1338Assert.Empty(result.ProblemDetails.Extensions); 1348Assert.Null(result.ProblemDetails.Detail); 1349Assert.Null(result.ProblemDetails.Instance); 1352Assert.Equal("An error occurred while processing your request.", result.ProblemDetails.Title); 1353Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", result.ProblemDetails.Type); 1354Assert.Empty(result.ProblemDetails.Extensions); 1367Assert.Equal(problem, result.ProblemDetails); 1368Assert.Equal("Test title", result.ProblemDetails.Title); 1383Assert.Equal(problem, result.ProblemDetails); 1384Assert.Equal("Test title", result.ProblemDetails.Title); 1414Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails); 1415Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors); 1416Assert.Equal(detail, result.ProblemDetails.Detail); 1417Assert.Equal(instance, result.ProblemDetails.Instance); 1418Assert.Equal(statusCode, result.ProblemDetails.Status); 1420Assert.Equal(title, result.ProblemDetails.Title); 1421Assert.Equal(type, result.ProblemDetails.Type); 1423Assert.Equal(extensions, result.ProblemDetails.Extensions); 1445Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails); 1446Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors); 1447Assert.Equal(detail, result.ProblemDetails.Detail); 1448Assert.Equal(instance, result.ProblemDetails.Instance); 1449Assert.Equal(statusCode, result.ProblemDetails.Status); 1451Assert.Equal(title, result.ProblemDetails.Title); 1452Assert.Equal(type, result.ProblemDetails.Type); 1454Assert.Equal(extensions, result.ProblemDetails.Extensions);
TypedResultsTests.cs (25)
1078Assert.Equal(detail, result.ProblemDetails.Detail); 1079Assert.Equal(instance, result.ProblemDetails.Instance); 1082Assert.Equal(title, result.ProblemDetails.Title); 1083Assert.Equal(type, result.ProblemDetails.Type); 1084Assert.Equal(extensions, result.ProblemDetails.Extensions); 1102Assert.Equal(detail, result.ProblemDetails.Detail); 1103Assert.Equal(instance, result.ProblemDetails.Instance); 1106Assert.Equal(title, result.ProblemDetails.Title); 1107Assert.Equal(type, result.ProblemDetails.Type); 1108Assert.Equal(extensions, result.ProblemDetails.Extensions); 1123Assert.Null(result.ProblemDetails.Detail); 1124Assert.Null(result.ProblemDetails.Instance); 1127Assert.Equal(title, result.ProblemDetails.Title); 1128Assert.Equal(type, result.ProblemDetails.Type); 1129Assert.NotNull(result.ProblemDetails.Extensions); 1130Assert.Empty(result.ProblemDetails.Extensions); 1140Assert.Null(result.ProblemDetails.Detail); 1141Assert.Null(result.ProblemDetails.Instance); 1144Assert.Equal("An error occurred while processing your request.", result.ProblemDetails.Title); 1145Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", result.ProblemDetails.Type); 1146Assert.Empty(result.ProblemDetails.Extensions); 1159Assert.Equal(problem, result.ProblemDetails); 1160Assert.Equal("Test title", result.ProblemDetails.Title); 1175Assert.Equal(problem, result.ProblemDetails); 1176Assert.Equal("Test title", result.ProblemDetails.Title);