1 instantiation of NotFound
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
663
public static NotFound<TValue> NotFound<TValue>(TValue? value) =>
new
(value);
19 references to NotFound
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
662
/// <returns>The created <see cref="HttpResults.
NotFound
{TValue}"/> for the response.</returns>
663
public static
NotFound
<TValue> NotFound<TValue>(TValue? value) => new(value);
Microsoft.AspNetCore.Http.Results.Tests (15)
NotFoundOfTResultTests.cs (9)
22
var
result = new NotFound<HttpValidationProblemDetails>(obj);
34
var
notFound = new NotFound<object>(null);
44
var
notFound = new NotFound<string>("Test Content");
56
var
result = new NotFound<string>("Test Content");
69
NotFound
<Todo> MyApi() { throw new NotImplementedException(); }
74
PopulateMetadata<
NotFound
<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder);
87
var
result = new NotFound<object>(null);
98
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<
NotFound
<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
99
Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<
NotFound
<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (5)
1172
var
result = Results.NotFound(value) as
NotFound
<object>;
1186
var
result = Results.NotFound(value) as
NotFound
<Todo>;
1762
(() => Results.NotFound(new()), typeof(
NotFound
<object>)),
TypedResultsTests.cs (1)
1016
var
result = TypedResults.NotFound(value);
Microsoft.AspNetCore.OpenApi.Tests (1)
Extensions\JsonTypeInfoExtensionsTests.cs (1)
50
[typeof(
NotFound
<TodoWithDueDate>), "NotFoundOfTodoWithDueDate"],
Sample (1)
Program.cs (1)
100
schemas.MapGet("/multiple-results", Results<Ok<Triangle>,
NotFound
<string>> () => Random.Shared.Next(0, 2) == 0