1 instantiation of NotFound
Microsoft.AspNetCore.Http.Results (1)
ResultsCache.cs (1)
10
public static NotFound NotFound { get; } =
new
();
20 references to NotFound
Microsoft.AspNetCore.Http.Results (5)
NotFound.cs (1)
19
/// Initializes a new instance of the <see cref="
NotFound
"/> class with the values.
NotFoundOfT.cs (1)
20
/// Initializes a new instance of the <see cref="
NotFound
"/> class with the values.
ResultsCache.cs (1)
10
public static
NotFound
NotFound { get; } = new();
TypedResults.cs (2)
654
/// <returns>The created <see cref="HttpResults.
NotFound
"/> for the response.</returns>
655
public static
NotFound
NotFound() => ResultsCache.NotFound;
Microsoft.AspNetCore.Http.Results.Tests (11)
NotFoundResultTests.cs (7)
21
var
notFound = new NotFound();
32
var
result = new NotFound();
45
NotFound
MyApi() { throw new NotImplementedException(); }
50
PopulateMetadata<
NotFound
>(((Delegate)MyApi).GetMethodInfo(), builder);
62
var
result = new NotFound();
73
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<
NotFound
>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
74
Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<
NotFound
>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (3)
1197
var
result = Results.NotFound() as
NotFound
;
1761
(() => Results.NotFound(null), typeof(
NotFound
)),
TypedResultsTests.cs (1)
1027
var
result = TypedResults.NotFound();
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (3)
260
accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem,
NotFound
>>
336
accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem,
NotFound
>>
348
accountGroup.MapPost("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem,
NotFound
>>
MinimalSample (1)
Program.cs (1)
72
app.MapGet("/todo/{id}", Results<Ok<Todo>,
NotFound
, BadRequest> (int id) => id switch