71 writes to AttributeRouteInfo
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (11)
DefaultApiDescriptionProviderTest.cs (11)
176action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 222action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 255action.AttributeRouteInfo = new AttributeRouteInfo { Template = "api/products" }; 284action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 329action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 360action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 385action.AttributeRouteInfo = new AttributeRouteInfo { Template = template }; 409action.AttributeRouteInfo = new AttributeRouteInfo 427action.AttributeRouteInfo = new AttributeRouteInfo 451action.AttributeRouteInfo = new AttributeRouteInfo 474action.AttributeRouteInfo = new AttributeRouteInfo
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
201actionDescriptor.AttributeRouteInfo = new AttributeRouteInfo
Microsoft.AspNetCore.Mvc.Core.Test (39)
Infrastructure\ActionSelectionTableTest.cs (2)
250AttributeRouteInfo = new AttributeRouteInfo() 280AttributeRouteInfo = new AttributeRouteInfo()
Infrastructure\ActionSelectorTest.cs (1)
197AttributeRouteInfo = new AttributeRouteInfo()
Routing\ActionEndpointFactoryTest.cs (1)
470actionDescriptor.AttributeRouteInfo = new AttributeRouteInfo
Routing\AttributeRouteTest.cs (25)
34AttributeRouteInfo = new AttributeRouteInfo() 41AttributeRouteInfo = new AttributeRouteInfo() 120AttributeRouteInfo = new AttributeRouteInfo() 164AttributeRouteInfo = new AttributeRouteInfo() 208AttributeRouteInfo = new AttributeRouteInfo() 255AttributeRouteInfo = new AttributeRouteInfo() 269AttributeRouteInfo = new AttributeRouteInfo() 323AttributeRouteInfo = new AttributeRouteInfo() 366AttributeRouteInfo = new AttributeRouteInfo() 409AttributeRouteInfo = new AttributeRouteInfo() 457AttributeRouteInfo = new AttributeRouteInfo() 471AttributeRouteInfo = new AttributeRouteInfo() 517AttributeRouteInfo = new AttributeRouteInfo() 548AttributeRouteInfo = new AttributeRouteInfo 557AttributeRouteInfo = new AttributeRouteInfo 565AttributeRouteInfo = new AttributeRouteInfo 604AttributeRouteInfo = new AttributeRouteInfo 613AttributeRouteInfo = new AttributeRouteInfo 621AttributeRouteInfo = new AttributeRouteInfo 660AttributeRouteInfo = new AttributeRouteInfo 669AttributeRouteInfo = new AttributeRouteInfo 677AttributeRouteInfo = new AttributeRouteInfo 716AttributeRouteInfo = new AttributeRouteInfo 725AttributeRouteInfo = new AttributeRouteInfo 733AttributeRouteInfo = new AttributeRouteInfo
Routing\AttributeRoutingTest.cs (2)
124action.AttributeRouteInfo = new AttributeRouteInfo(); 153AttributeRouteInfo = new AttributeRouteInfo { Template = template },
Routing\ControllerActionEndpointDataSourceTest.cs (8)
24AttributeRouteInfo = new AttributeRouteInfo() 56AttributeRouteInfo = new AttributeRouteInfo() 136AttributeRouteInfo = new AttributeRouteInfo() 217AttributeRouteInfo = new AttributeRouteInfo() 305AttributeRouteInfo = new AttributeRouteInfo() 386AttributeRouteInfo = new AttributeRouteInfo() 487AttributeRouteInfo = new AttributeRouteInfo() 574action.AttributeRouteInfo = new AttributeRouteInfo
Microsoft.AspNetCore.Mvc.Razor.Test (1)
RazorViewEngineTest.cs (1)
1708AttributeRouteInfo = new AttributeRouteInfo(),
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
48AttributeRouteInfo = actionDescriptor.AttributeRouteInfo,
Infrastructure\PageActionDescriptorProvider.cs (1)
94AttributeRouteInfo = new AttributeRouteInfo
Microsoft.AspNetCore.Mvc.RazorPages.Test (16)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (5)
23AttributeRouteInfo = new AttributeRouteInfo(), 52AttributeRouteInfo = new AttributeRouteInfo(), 103AttributeRouteInfo = new AttributeRouteInfo(), 145AttributeRouteInfo = new AttributeRouteInfo(), 406AttributeRouteInfo = new AttributeRouteInfo(),
Infrastructure\DefaultPageLoaderTest.cs (4)
107AttributeRouteInfo = new AttributeRouteInfo() 224AttributeRouteInfo = new AttributeRouteInfo() 278AttributeRouteInfo = new AttributeRouteInfo() 286AttributeRouteInfo = new AttributeRouteInfo()
Infrastructure\PageActionEndpointDataSourceTest.cs (7)
25AttributeRouteInfo = new AttributeRouteInfo() 57AttributeRouteInfo = new AttributeRouteInfo() 101AttributeRouteInfo = new AttributeRouteInfo() 114AttributeRouteInfo = new AttributeRouteInfo() 179AttributeRouteInfo = new AttributeRouteInfo() 221AttributeRouteInfo = new AttributeRouteInfo() 282action.AttributeRouteInfo = new AttributeRouteInfo
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
219action.AttributeRouteInfo = new()
99 references to AttributeRouteInfo
BasicWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
38var attributeRoutingInfo = _actionContext.ActionDescriptor.AttributeRouteInfo;
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
38var attributeRoutingInfo = _actionContext.ActionDescriptor.AttributeRouteInfo;
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
DefaultApiDescriptionProvider.cs (4)
68if (action.AttributeRouteInfo != null && action.AttributeRouteInfo.SuppressPathMatching) 377if (action.AttributeRouteInfo?.Template != null) 379return TemplateParser.Parse(action.AttributeRouteInfo.Template);
Microsoft.AspNetCore.Mvc.Core (15)
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
254return actionDescriptor.AttributeRouteInfo != null;
Infrastructure\ActionSelectionTable.cs (1)
67items: actions.Items.Where(a => a.AttributeRouteInfo == null),
Routing\ActionEndpointFactory.cs (7)
83if (action.AttributeRouteInfo?.Template == null) 130var attributeRoutePattern = RoutePatternFactory.Parse(action.AttributeRouteInfo.Template); 151var builder = new RouteEndpointBuilder(requestDelegate, updatedRoutePattern, action.AttributeRouteInfo.Order) 160action.AttributeRouteInfo.Name, 162action.AttributeRouteInfo.SuppressLinkGeneration, 163action.AttributeRouteInfo.SuppressPathMatching, 322attributeRoutePattern = RoutePatternFactory.Parse(action.AttributeRouteInfo!.Template!, updatedDefaults, parameterPolicies: null);
Routing\AttributeRoute.cs (6)
147var attributeRoutedActions = actions.Where(a => a.AttributeRouteInfo?.Template != null); 189var template = action.AttributeRouteInfo!.Template!; 198routeInfo.SuppressPathMatching = action.AttributeRouteInfo.SuppressPathMatching; 199routeInfo.SuppressLinkGeneration = action.AttributeRouteInfo.SuppressLinkGeneration; 223routeInfo.Order = action.AttributeRouteInfo.Order; 224routeInfo.RouteName = action.AttributeRouteInfo.Name;
Microsoft.AspNetCore.Mvc.Core.Test (61)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (58)
109Assert.Equal("Items", descriptor.AttributeRouteInfo.Template); 412Assert.Equal("api/Token/value/TokenReplacement/stub/ThisIsAnAction", action.AttributeRouteInfo.Template); 462Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v1/List")); 463Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v1/All")); 464Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v2/List")); 465Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v2/All")); 492Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v1/List")); 493Assert.Single(actions, a => a.AttributeRouteInfo.Template.Equals("v2/List")); 516Assert.NotNull(action.AttributeRouteInfo); 517Assert.Equal("Override", action.AttributeRouteInfo.Template); 537Assert.NotNull(action.AttributeRouteInfo); 538Assert.NotNull(action.AttributeRouteInfo.Template); 548Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v1/All")); 549Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v2/All")); 555Assert.Single(routeActions, a => a.AttributeRouteInfo.Template.Equals("v1/List")); 556Assert.Single(routeActions, a => a.AttributeRouteInfo.Template.Equals("v2/List")); 576Assert.NotNull(action.AttributeRouteInfo); 577Assert.NotNull(action.AttributeRouteInfo.Template); 587Assert.Single(postActions, a => a.AttributeRouteInfo.Template.Equals("v1")); 588Assert.Single(postActions, a => a.AttributeRouteInfo.Template.Equals("v2")); 594Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v1/All")); 595Assert.Single(putActions, a => a.AttributeRouteInfo.Template.Equals("v2/All")); 600Assert.Single(unconstrainedActions, a => a.AttributeRouteInfo.Template.Equals("v1/List")); 601Assert.Single(unconstrainedActions, a => a.AttributeRouteInfo.Template.Equals("v2/List")); 617Assert.NotNull(controllerAndAction.AttributeRouteInfo); 620Assert.NotNull(controllerActionAndOverride.AttributeRouteInfo); 623controllerAndAction.AttributeRouteInfo.Template, 624controllerActionAndOverride.AttributeRouteInfo.Template, 651Assert.NotNull(action.AttributeRouteInfo); 652Assert.Equal("Products/list", action.AttributeRouteInfo.Template); 746Assert.NotNull(action.AttributeRouteInfo); 747Assert.Equal("Products/Index", action.AttributeRouteInfo.Template); 793Assert.NotNull(descriptor.AttributeRouteInfo); 794Assert.Equal("{id}", descriptor.AttributeRouteInfo.Template, StringComparer.OrdinalIgnoreCase); 795Assert.Equal("Products", descriptor.AttributeRouteInfo.Name, StringComparer.OrdinalIgnoreCase); 816Assert.NotNull(getAction.AttributeRouteInfo); 817Assert.Equal("Products/Get", getAction.AttributeRouteInfo.Template, StringComparer.OrdinalIgnoreCase); 818Assert.Equal("Products_Get", getAction.AttributeRouteInfo.Name, StringComparer.OrdinalIgnoreCase); 822Assert.NotNull(editAction.AttributeRouteInfo); 823Assert.Equal("Products/Edit", editAction.AttributeRouteInfo.Template, StringComparer.OrdinalIgnoreCase); 824Assert.Equal("Products_Edit", editAction.AttributeRouteInfo.Name, StringComparer.OrdinalIgnoreCase); 844Assert.NotNull(getAction.AttributeRouteInfo); 847getAction.AttributeRouteInfo.Template, StringComparer.OrdinalIgnoreCase); 850getAction.AttributeRouteInfo.Name, StringComparer.OrdinalIgnoreCase); 854Assert.NotNull(editAction.AttributeRouteInfo); 857editAction.AttributeRouteInfo.Template, StringComparer.OrdinalIgnoreCase); 860editAction.AttributeRouteInfo.Name, StringComparer.OrdinalIgnoreCase); 926Assert.Equal("stub/ThisIsAnAction", action.AttributeRouteInfo.Template); 941Assert.Equal("stub/{controller}/{action}", action.AttributeRouteInfo.Template); 1190var action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "R1"); 1196action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "R2"); 1216var action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C1/A1"); 1222action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C2/A1"); 1243var action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C1/A3"); 1249action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C2/A3"); 1255action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C1/A4"); 1261action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "C2/A4"); 1282var action = Assert.Single(actions, a => a.AttributeRouteInfo.Template == "A2");
Routing\ActionEndpointFactoryTest.cs (2)
244action.AttributeRouteInfo.Name = "Test"; 264action.AttributeRouteInfo.Name = "Test";
Routing\AttributeRoutingTest.cs (1)
125action.AttributeRouteInfo.Template = "{controller}/{action}";
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
48AttributeRouteInfo = actionDescriptor.AttributeRouteInfo,
ApplicationModels\PageApplicationModel.cs (1)
104public string? RouteTemplate => ActionDescriptor.AttributeRouteInfo?.Template;
Microsoft.AspNetCore.Mvc.RazorPages.Test (12)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (2)
39Assert.Same(actionDescriptor.AttributeRouteInfo, actual.AttributeRouteInfo);
Infrastructure\PageActionDescriptorProviderTest.cs (10)
64Assert.Equal("/Test/{id:int?}", descriptor.AttributeRouteInfo.Template); 165Assert.Equal("Accounts/Test/{id:int?}", descriptor.AttributeRouteInfo.Template); 284result => Assert.Equal("base-path/Test/Home", result.AttributeRouteInfo.Template), 285result => Assert.Equal("base-path/Index", result.AttributeRouteInfo.Template), 286result => Assert.Equal("base-path/", result.AttributeRouteInfo.Template), 287result => Assert.Equal("base-path/Admin/Index", result.AttributeRouteInfo.Template), 288result => Assert.Equal("base-path/Admin", result.AttributeRouteInfo.Template), 289result => Assert.Equal("base-path/Admin/User", result.AttributeRouteInfo.Template)); 333Assert.Equal("/Catalog/Details/Index/{id:int?}", descriptor.AttributeRouteInfo.Template); 340Assert.Equal("/Catalog/Details/{id:int?}", descriptor.AttributeRouteInfo.Template);
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiDocumentService.cs (1)
304=> description.ActionDescriptor.AttributeRouteInfo?.Name ??
Mvc.RoutingWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
38var attributeRoutingInfo = _actionContext.ActionDescriptor.AttributeRouteInfo;
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
38var attributeRoutingInfo = _actionContext.ActionDescriptor.AttributeRouteInfo;