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