1 instantiation of InternalServerError
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
745
public static InternalServerError<TValue> InternalServerError<TValue>(TValue? error) =>
new
(error);
18 references to InternalServerError
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
744
/// <returns>The created <see cref="HttpResults.
InternalServerError
{TValue}"/> for the response.</returns>
745
public static
InternalServerError
<TValue> InternalServerError<TValue>(TValue? error) => new(error);
Microsoft.AspNetCore.Http.Results.Tests (16)
InternalServerErrorOfTResultTests.cs (10)
25
var
internalServerErrorObjectResult = new InternalServerError<object>(obj);
37
var
result = new InternalServerError<HttpValidationProblemDetails>(obj);
49
var
result = new InternalServerError<string>("Hello");
66
var
result = new InternalServerError<string>("Hello");
89
var
result = new InternalServerError<ProblemDetails>(details);
109
InternalServerError
<Todo> MyApi() { throw new NotImplementedException(); }
114
PopulateMetadata<
InternalServerError
<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder);
127
var
result = new InternalServerError<object>(null);
138
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<
InternalServerError
<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
139
Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<
InternalServerError
<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (5)
408
var
result = Results.InternalServerError(value) as
InternalServerError
<object>;
422
var
result = Results.InternalServerError(value) as
InternalServerError
<Todo>;
1758
(() => Results.InternalServerError<object>(new()), typeof(
InternalServerError
<object>)),
TypedResultsTests.cs (1)
1484
var
result = TypedResults.InternalServerError(value);