1 instantiation of UnprocessableEntity
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
731
public static UnprocessableEntity<TValue> UnprocessableEntity<TValue>(TValue? error) =>
new
(error);
12 references to UnprocessableEntity
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
730
/// <returns>The created <see cref="HttpResults.
UnprocessableEntity
{TValue}"/> for the response.</returns>
731
public static
UnprocessableEntity
<TValue> UnprocessableEntity<TValue>(TValue? error) => new(error);
Microsoft.AspNetCore.Http.Results.Tests (10)
ResultsTests.cs (1)
1779
(() => Results.UnprocessableEntity(new()), typeof(
UnprocessableEntity
<object>)),
UnprocessableEntityOfTResultTests.cs (9)
23
var
result = new UnprocessableEntity<HttpValidationProblemDetails>(obj);
36
var
result = new UnprocessableEntity<object>(obj);
47
var
result = new UnprocessableEntity<string>("Hello");
64
var
result = new UnprocessableEntity<string>("Hello");
86
UnprocessableEntity
<Todo> MyApi() { throw new NotImplementedException(); }
91
PopulateMetadata<
UnprocessableEntity
<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder);
104
var
result = new UnprocessableEntity<object>(null);
115
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<
UnprocessableEntity
<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
116
Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<
UnprocessableEntity
<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));