2 instantiations of CreatedAtRoute
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
968=> new(routeName, routeValues, value); 979=> new(routeName, routeValues, value);
33 references to CreatedAtRoute
Microsoft.AspNetCore.Http.Results (4)
TypedResults.cs (4)
963/// <returns>The created <see cref="HttpResults.CreatedAtRoute{TValue}"/> for the response.</returns> 966public static CreatedAtRoute<TValue> CreatedAtRoute<TValue>(TValue? value, string? routeName = null, object? routeValues = null) 977/// <returns>The created <see cref="HttpResults.CreatedAtRoute{TValue}"/> for the response.</returns> 978public static CreatedAtRoute<TValue> CreatedAtRoute<TValue>(TValue? value, string? routeName, RouteValueDictionary? routeValues)
Microsoft.AspNetCore.Http.Results.Tests (29)
CreatedAtRouteOfTResultTests.cs (11)
28var result = new CreatedAtRoute<HttpValidationProblemDetails>(routeValues, obj); 64var result = new CreatedAtRoute<object>(routeName: null, routeValues: values, value: null); 80var result = new CreatedAtRoute<object>( 95CreatedAtRoute<Todo> MyApi() { throw new NotImplementedException(); } 100PopulateMetadata<CreatedAtRoute<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder); 113var result = new CreatedAtRoute<object>(null, null); 124Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<CreatedAtRoute<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 125Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<CreatedAtRoute<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null)); 132var rawResult = new CreatedAtRoute<object>( 147var rawResult = new CreatedAtRoute<string>( 163var rawResult = new CreatedAtRoute<string>(
ResultsTests.cs (14)
753var result = Results.CreatedAtRoute(routeName, routeValues, value) as CreatedAtRoute<object>; 771var result = Results.CreatedAtRoute(routeName, routeValues, value) as CreatedAtRoute<object>; 817var result = Results.CreatedAtRoute(routeName, routeValues, value) as CreatedAtRoute<Todo>; 835var result = Results.CreatedAtRoute(routeName, routeValues, value) as CreatedAtRoute<Todo>; 852var result = Results.CreatedAtRoute(routeName, null, value) as CreatedAtRoute<object>; 869var result = Results.CreatedAtRoute(routeName, null, value) as CreatedAtRoute<Todo>; 1748(() => Results.CreatedAtRoute("routeName", (object)null, new()), typeof(CreatedAtRoute<object>)), 1750(() => Results.CreatedAtRoute("routeName", null, new()), typeof(CreatedAtRoute<object>)),
TypedResultsTests.cs (4)
701var result = TypedResults.CreatedAtRoute(value, routeName, routeValues); 718var result = TypedResults.CreatedAtRoute(value, routeName, null); 777var result = TypedResults.CreatedAtRoute(value: value, routeValues: routeValues); 806var result = TypedResults.CreatedAtRoute<object>(null, null, null);