82 instantiations of FromRouteAttribute
ApiExplorerWebSite (1)
Controllers\ApiExplorerParametersController.cs (1)
16public void SimpleParametersWithBinderMetadata([FromQuery] int i, [FromRoute] string s)
BasicWebSite (7)
Controllers\BindPropertiesController.cs (1)
16[FromRoute]
Controllers\TestingController.cs (5)
25[FromRoute] int value, 114public IActionResult AntiforgerySimulator([FromRoute] int value) 124public IActionResult PostRedirectGetPost([FromRoute] int value) 144public IActionResult PostRedirectGetGet([FromRoute] int value) 154public IActionResult PutNoBody([FromRoute] int value)
Models\Contact.cs (1)
36[FromRoute]
GenericHostWebSite (5)
Controllers\TestingController.cs (5)
24[FromRoute] int value, 100public IActionResult AntiforgerySimulator([FromRoute] int value) 110public IActionResult PostRedirectGetPost([FromRoute] int value) 130public IActionResult PostRedirectGetGet([FromRoute] int value) 140public IActionResult PutNoBody([FromRoute] int value)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\ApiRoutingController.cs (2)
22[FromRoute][PrivateData] string userId, 23[FromRoute] string noDataClassification,
Microsoft.AspNetCore.Http.Extensions.Tests (9)
RequestDelegateGenerator\SharedTypes.cs (9)
716public record struct ParameterListRecordStruct(HttpContext HttpContext, [FromRoute] int Value); 718public record ParameterListRecordClass(HttpContext HttpContext, [FromRoute] int Value); 726[FromRoute] 735[FromRoute] 749[FromRoute] 782[FromRoute] 791[FromRoute] 811public ParameterListWitDefaultValue(HttpContext httpContext, [FromRoute] int value = 42) 854[FromRoute]
Microsoft.AspNetCore.Http.Microbenchmarks (9)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (9)
716public record struct ParameterListRecordStruct(HttpContext HttpContext, [FromRoute] int Value); 718public record ParameterListRecordClass(HttpContext HttpContext, [FromRoute] int Value); 726[FromRoute] 735[FromRoute] 749[FromRoute] 782[FromRoute] 791[FromRoute] 811public ParameterListWitDefaultValue(HttpContext httpContext, [FromRoute] int value = 42) 854[FromRoute]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (13)
DefaultApiDescriptionProviderTest.cs (5)
2466private void AcceptsId_Route([FromRoute] int id) 2554private void FromRouting([FromRoute] int id) 2586[FromRoute] 2709[FromRoute] 2726[FromRoute]
EndpointMetadataApiDescriptionProviderTest.cs (8)
428AssertPathParameter(GetApiDescription(([FromRoute] int foo) => { })); 620var apiDescription = GetApiDescription(([FromRoute] int foo, int bar, InferredJsonClass fromBody) => { }, httpMethods: ["POST"]); 742var apiDescription = GetApiDescription(([FromRoute] int foo, int? bar) => { }); 1652private record ArgumentListRecord([FromRoute] int Foo, int Bar, InferredJsonClass? FromBody, HttpContext context); 1654private record struct ArgumentListRecordStruct([FromRoute] int Foo, int Bar, InferredJsonClass? FromBody, HttpContext context); 1660[FromRoute] 1669[FromRoute] 1683[FromRoute]
Microsoft.AspNetCore.Mvc.Core.Test (6)
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
1289[FromRoute]
ApplicationModels\InferParameterBindingInfoConventionTest.cs (4)
1034public IActionResult FromRoute([FromRoute] int value) => null; 1037public IActionResult FromRouteWithCustomName([FromRoute(Name = "top")] int value) => null; 1040public IActionResult FromRouteOnComplexType([FromRoute] GpsCoordinates gpsCoordinates) => null; 1043public IActionResult FromRouteOnComplexTypeWithCustomName([FromRoute(Name = "gps")] GpsCoordinates gpsCoordinates) => null;
ModelBinding\Metadata\ModelAttributesTest.cs (1)
315[FromRoute]
Microsoft.AspNetCore.Mvc.RazorPages.Test (9)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (1)
302public void OnPost(string param1, [FromRoute(Name = "id")] int param2)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (4)
173[FromRoute] 215[FromRoute] 225[FromRoute] 410[FromRoute]
Infrastructure\PageBinderFactoryTest.cs (4)
864[FromRoute] 881[FromRoute] 904[FromRoute(Name = "route-value")] 921[FromRoute(Name = "route-value")]
Microsoft.AspNetCore.OpenApi.Tests (16)
Services\OpenApiGeneratorTests.cs (12)
338AssertPathParameter(GetOpenApiOperation(([FromRoute] int foo) => { })); 364AssertPathParameter(GetOpenApiOperation(([FromRoute] int? foo) => { })); 442var operation = GetOpenApiOperation(([FromRoute] int foo, int bar, InferredJsonClass fromBody) => { }); 501var operation = GetOpenApiOperation(([FromRoute] int foo, int? bar) => { }); 892var operation = GetOpenApiOperation(([FromBody] int fromBody, [FromRoute] int fromRoute, [FromServices] int fromServices) => { }); 936ValidateParameter(GetOpenApiOperation(([FromRoute(Name = "routeName")] string param) => ""), "routeName"); 937ValidateParameter(GetOpenApiOperation(([FromRoute(Name = "routeName")] string param) => "", "/{param}"), "routeName"); 1068private record ArgumentListRecord([FromRoute] int Foo, int Bar, InferredJsonClass FromBody, HttpContext context); 1070private record struct ArgumentListRecordStruct([FromRoute] int Foo, int Bar, InferredJsonClass FromBody, HttpContext context); 1076[FromRoute] 1085[FromRoute] 1099[FromRoute]
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (4)
518[FromRoute] 521[FromRoute] 527[FromRoute] 530[FromRoute]
Mvc.Api.Analyzers.Test (1)
TestFiles\SymbolApiConventionMatcherTest\SymbolApiConventionMatcherTestFile.cs (1)
54public static void MethodParameterWithRandomAttributes([FromRoute] int value) { }
Mvc.RoutingWebSite (1)
Controllers\FriendsController.cs (1)
20public IActionResult Get([FromRoute] string id)
RazorPagesWebSite (1)
Pages\PropertyBinding\PageModelWithPropertyBinding.cs (1)
14[FromRoute]
Sample (2)
Controllers\TestController.cs (2)
29[FromRoute] 32[FromRoute]
3 references to FromRouteAttribute
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
99nameof(FromRouteAttribute),
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Metadata\ModelAttributesTest.cs (2)
127Assert.Single(attributes.Attributes.OfType<FromRouteAttribute>()); 130Assert.Single(attributes.PropertyAttributes.OfType<FromRouteAttribute>());