82 instantiations of FromRouteAttribute
ApiExplorerWebSite (1)
Controllers\ApiExplorerParametersController.cs (1)
16
public void SimpleParametersWithBinderMetadata([FromQuery] int i, [
FromRoute
] string s)
BasicWebSite (7)
Controllers\BindPropertiesController.cs (1)
16
[
FromRoute
]
Controllers\TestingController.cs (5)
25
[
FromRoute
] int value,
114
public IActionResult AntiforgerySimulator([
FromRoute
] int value)
124
public IActionResult PostRedirectGetPost([
FromRoute
] int value)
144
public IActionResult PostRedirectGetGet([
FromRoute
] int value)
154
public IActionResult PutNoBody([
FromRoute
] int value)
Models\Contact.cs (1)
36
[
FromRoute
]
GenericHostWebSite (5)
Controllers\TestingController.cs (5)
24
[
FromRoute
] int value,
100
public IActionResult AntiforgerySimulator([
FromRoute
] int value)
110
public IActionResult PostRedirectGetPost([
FromRoute
] int value)
130
public IActionResult PostRedirectGetGet([
FromRoute
] int value)
140
public 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)
716
public record struct ParameterListRecordStruct(HttpContext HttpContext, [
FromRoute
] int Value);
718
public record ParameterListRecordClass(HttpContext HttpContext, [
FromRoute
] int Value);
726
[
FromRoute
]
735
[
FromRoute
]
749
[
FromRoute
]
782
[
FromRoute
]
791
[
FromRoute
]
811
public ParameterListWitDefaultValue(HttpContext httpContext, [
FromRoute
] int value = 42)
854
[
FromRoute
]
Microsoft.AspNetCore.Http.Microbenchmarks (9)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (9)
716
public record struct ParameterListRecordStruct(HttpContext HttpContext, [
FromRoute
] int Value);
718
public record ParameterListRecordClass(HttpContext HttpContext, [
FromRoute
] int Value);
726
[
FromRoute
]
735
[
FromRoute
]
749
[
FromRoute
]
782
[
FromRoute
]
791
[
FromRoute
]
811
public ParameterListWitDefaultValue(HttpContext httpContext, [
FromRoute
] int value = 42)
854
[
FromRoute
]
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (13)
DefaultApiDescriptionProviderTest.cs (5)
2466
private void AcceptsId_Route([
FromRoute
] int id)
2554
private void FromRouting([
FromRoute
] int id)
2586
[
FromRoute
]
2709
[
FromRoute
]
2726
[
FromRoute
]
EndpointMetadataApiDescriptionProviderTest.cs (8)
428
AssertPathParameter(GetApiDescription(([
FromRoute
] int foo) => { }));
620
var apiDescription = GetApiDescription(([
FromRoute
] int foo, int bar, InferredJsonClass fromBody) => { }, httpMethods: ["POST"]);
742
var apiDescription = GetApiDescription(([
FromRoute
] int foo, int? bar) => { });
1652
private record ArgumentListRecord([
FromRoute
] int Foo, int Bar, InferredJsonClass? FromBody, HttpContext context);
1654
private 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)
1034
public IActionResult FromRoute([
FromRoute
] int value) => null;
1037
public IActionResult FromRouteWithCustomName([
FromRoute
(Name = "top")] int value) => null;
1040
public IActionResult FromRouteOnComplexType([
FromRoute
] GpsCoordinates gpsCoordinates) => null;
1043
public 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)
302
public 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)
338
AssertPathParameter(GetOpenApiOperation(([
FromRoute
] int foo) => { }));
364
AssertPathParameter(GetOpenApiOperation(([
FromRoute
] int? foo) => { }));
442
var operation = GetOpenApiOperation(([
FromRoute
] int foo, int bar, InferredJsonClass fromBody) => { });
501
var operation = GetOpenApiOperation(([
FromRoute
] int foo, int? bar) => { });
892
var operation = GetOpenApiOperation(([FromBody] int fromBody, [
FromRoute
] int fromRoute, [FromServices] int fromServices) => { });
936
ValidateParameter(GetOpenApiOperation(([
FromRoute
(Name = "routeName")] string param) => ""), "routeName");
937
ValidateParameter(GetOpenApiOperation(([
FromRoute
(Name = "routeName")] string param) => "", "/{param}"), "routeName");
1068
private record ArgumentListRecord([
FromRoute
] int Foo, int Bar, InferredJsonClass FromBody, HttpContext context);
1070
private 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)
54
public static void MethodParameterWithRandomAttributes([
FromRoute
] int value) { }
Mvc.RoutingWebSite (1)
Controllers\FriendsController.cs (1)
20
public 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)
99
nameof(
FromRouteAttribute
),
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Metadata\ModelAttributesTest.cs (2)
127
Assert.Single(attributes.Attributes.OfType<
FromRouteAttribute
>());
130
Assert.Single(attributes.PropertyAttributes.OfType<
FromRouteAttribute
>());