2 instantiations of Created
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
910return new(uri, value); 932return new(uri, value);
36 references to Created
Microsoft.AspNetCore.Http.Results (4)
TypedResults.cs (4)
907/// <returns>The created <see cref="HttpResults.Created{TValue}"/> for the response.</returns> 908public static Created<TValue> Created<TValue>(string? uri, TValue? value) 929/// <returns>The created <see cref="HttpResults.Created{TValue}"/> for the response.</returns> 930public static Created<TValue> Created<TValue>(Uri? uri, TValue? value)
Microsoft.AspNetCore.Http.Results.Tests (30)
CreatedOfTResultTests.cs (10)
24var result = new Created<HttpValidationProblemDetails>(expectedUrl, obj); 39var result = new Created<string>(location, "testInput"); 51var result = new Created<string>(location, "testInput"); 68var result = new Created<string>(location, "testInput"); 87var result = new Created<string>(location, "testInput"); 101Created<Todo> MyApi() { throw new NotImplementedException(); } 106PopulateMetadata<Created<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder); 119var result = new Created<object>("location", null); 130Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Created<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 131Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Created<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (15)
588var result = Results.Created(uri, value) as Created<object>; 604var result = Results.Created(uri, value) as Created<Todo>; 634var result = Results.Created(uri, value) as Created<object>; 650var result = Results.Created(uri, value) as Created<Todo>; 709var result = Results.Created(default(string), value) as Created<object>; 723var result = Results.Created(string.Empty, value) as Created<object>; 737var result = Results.Created(default(Uri), value) as Created<object>; 1746(() => Results.Created("/path", new()), typeof(Created<object>)),
TypedResultsTests.cs (5)
585var result = TypedResults.Created(uri, value); 615var result = TypedResults.Created(uri, value); 666var result = TypedResults.Created(default(string), default(object)); 676var result = TypedResults.Created(string.Empty, default(object)); 686var result = TypedResults.Created(default(Uri), default(object));
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
280var apiDescription = GetApiDescription(Results<Created<InferredJsonClass>, BadRequest> () => 388async Task<Results<Created<InferredJsonClass>, ProblemHttpResult>> () =>