1 instantiation of NotFound
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
663public static NotFound<TValue> NotFound<TValue>(TValue? value) => new(value);
17 references to NotFound
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
662/// <returns>The created <see cref="HttpResults.NotFound{TValue}"/> for the response.</returns> 663public static NotFound<TValue> NotFound<TValue>(TValue? value) => new(value);
Microsoft.AspNetCore.Http.Results.Tests (15)
NotFoundOfTResultTests.cs (9)
22var result = new NotFound<HttpValidationProblemDetails>(obj); 34var notFound = new NotFound<object>(null); 44var notFound = new NotFound<string>("Test Content"); 56var result = new NotFound<string>("Test Content"); 69NotFound<Todo> MyApi() { throw new NotImplementedException(); } 74PopulateMetadata<NotFound<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder); 87var result = new NotFound<object>(null); 98Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<NotFound<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 99Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<NotFound<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (5)
1172var result = Results.NotFound(value) as NotFound<object>; 1186var result = Results.NotFound(value) as NotFound<Todo>; 1683(() => Results.NotFound(new()), typeof(NotFound<object>)),
TypedResultsTests.cs (1)
1016var result = TypedResults.NotFound(value);