2 instantiations of Accepted
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
997=> new(uri, value); 1022return new(uri, value);
19 references to Accepted
Microsoft.AspNetCore.Http.Results (4)
TypedResults.cs (4)
995/// <returns>The created <see cref="HttpResults.Accepted{TValue}"/> for the response.</returns> 996public static Accepted<TValue> Accepted<TValue>(string? uri, TValue? value) 1017/// <returns>The created <see cref="HttpResults.Accepted{TValue}"/> for the response.</returns> 1018public static Accepted<TValue> Accepted<TValue>(Uri uri, TValue? value)
Microsoft.AspNetCore.Http.Results.Tests (15)
AcceptedOfTResultTests.cs (8)
24var result = new Accepted<string>("my-location", value: "Hello world"); 40var result = new Accepted<string>(expectedUrl, value: "some-value"); 54var result = new Accepted<HttpValidationProblemDetails>(expectedUrl, obj); 66Accepted<Todo> MyApi() { throw new NotImplementedException(); } 71PopulateMetadata<Accepted<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder); 84var result = new Accepted<object>("location", null); 95Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Accepted<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 96Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Accepted<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (5)
31var result = Results.Accepted(uri, value) as Accepted<object>; 47var result = Results.Accepted(uri, value) as Accepted<Todo>; 1731(() => Results.Accepted(null, new()), typeof(Accepted<object>)),
TypedResultsTests.cs (2)
30var result = TypedResults.Accepted(uri, value); 74var result = TypedResults.Accepted(uri, value);