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