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