20 writes to Template
ApiExplorerWebSite (1)
ApiExplorerRouteChangeConvention.cs (1)
27
Template
= "NewIndex"
Microsoft.AspNetCore.Mvc.Core (4)
ApplicationModels\ApplicationModelFactory.cs (1)
147
selector.AttributeRouteModel.
Template
= AttributeRouteModel.ReplaceTokens(
ApplicationModels\AttributeRouteModel.cs (3)
36
Template
= templateProvider.Template;
52
Template
= other.Template;
125
Template
= combinedTemplate,
Microsoft.AspNetCore.Mvc.Core.Test (6)
ApplicationModels\AttributeRouteModelTests.cs (5)
286
Template
= "Template"
304
Template
= "Template",
323
Template
= "Template",
341
Template
= "Template",
794
Template
= template,
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
1958
Template
= "/!!!",
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (1)
164
Template
= AttributeRouteModel.CombineTemplates(prefix, routeTemplate),
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\PageRouteModelFactory.cs (1)
164
Template
= AttributeRouteModel.CombineTemplates(prefix, routeTemplate),
DependencyInjection\PageConventionCollectionExtensions.cs (1)
436
Template
= route,
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
DependencyInjection\PageConventionCollectionExtensionsTest.cs (1)
991
Template
= template,
Infrastructure\PageActionDescriptorProviderTest.cs (5)
44
Template
= "/Test/{id:int?}",
83
Template
= "/Test/{id:int?}",
133
Template
= "Accounts/Test/{id:int?}",
298
Template
= template,
354
Template
= "Home",
63 references to Template
ApplicationModelWebSite (1)
Controllers\HomeController.cs (1)
44
var selector = model.Selectors.First(f => f.AttributeRouteModel.
Template
== "Home/CannotBeRouted");
Microsoft.AspNetCore.Mvc.Core (14)
ApplicationModels\ApplicationModelFactory.cs (5)
148
selector.AttributeRouteModel.
Template
!,
232
var template = actions[0].selector.AttributeRouteModel!.
Template
!;
236
var other = actions[i].selector.AttributeRouteModel!.
Template
;
242
return Resources.FormatAttributeRoute_DuplicateNames_Item(a.action.DisplayName, a.selector.AttributeRouteModel!.
Template
);
301
var routeTemplate = selector.AttributeRouteModel?.
Template
?? nullTemplate;
ApplicationModels\AttributeRouteModel.cs (7)
52
Template = other.
Template
;
91
public bool IsAbsoluteTemplate =>
Template
!= null && IsOverridePattern(
Template
);
110
if (left == null || IsOverridePattern(right.
Template
))
115
var combinedTemplate = CombineTemplates(left.
Template
, right.
Template
);
164
if (right.Name == null && string.IsNullOrEmpty(right.
Template
))
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
203
Template = selectorModel.AttributeRouteModel.
Template
,
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
162
var parsedTemplate = TemplateParser.Parse(selector.AttributeRouteModel.
Template
!);
Microsoft.AspNetCore.Mvc.Core.Test (12)
ApplicationModels\AttributeRouteModelTests.cs (4)
231
Assert.Equal(expectedResult.
Template
, combined.
Template
);
254
var expectedTemplate = AttributeRouteModel.CombineTemplates(null, right.
Template
);
261
Assert.Equal(expectedTemplate, combined.
Template
);
ApplicationModels\DefaultApplicationModelProviderTest.cs (8)
446
var route = Assert.Single(attributeRoutes, r => r.
Template
== "A");
449
route = Assert.Single(attributeRoutes, r => r.
Template
== "B");
468
var route = Assert.Single(attributeRoutes, r => r.
Template
== "C");
471
route = Assert.Single(attributeRoutes, r => r.
Template
== "D");
882
Assert.Equal("Change", attributeRoute.
Template
);
906
Assert.Equal("Update", attributeRoute.
Template
);
935
Assert.Equal("ListAll", attributeRoute.
Template
);
1069
Assert.Equal("Products", attributeRoute.
Template
);
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\PageActionDescriptorProvider.cs (2)
132
return selectorModel.AttributeRouteModel!.
Template
;
141
return selectorModel.AttributeRouteModel!.
Template
;
Microsoft.AspNetCore.Mvc.RazorPages.Test (34)
ApplicationModels\CompiledPageRouteModelProviderTest.cs (20)
44
selector => Assert.Equal("About", selector.AttributeRouteModel.
Template
));
59
selector => Assert.Equal("Home/some-prefix", selector.AttributeRouteModel.
Template
));
106
selector => Assert.Equal("Products/About", selector.AttributeRouteModel.
Template
));
125
selector => Assert.Equal("Products/Manage/Index", selector.AttributeRouteModel.
Template
),
126
selector => Assert.Equal("Products/Manage", selector.AttributeRouteModel.
Template
));
146
selector => Assert.Equal("Products/Manage/Edit/{id}", selector.AttributeRouteModel.
Template
));
194
selector => Assert.Equal("Accounts/Manage/Home", selector.AttributeRouteModel.
Template
));
214
selector => Assert.Equal("Contact", selector.AttributeRouteModel.
Template
));
254
selector => Assert.Equal("Pages/Index", selector.AttributeRouteModel.
Template
),
255
selector => Assert.Equal("Pages", selector.AttributeRouteModel.
Template
));
263
selector => Assert.Equal("Pages/Admin/Index/some-template", selector.AttributeRouteModel.
Template
),
264
selector => Assert.Equal("Pages/Admin/some-template", selector.AttributeRouteModel.
Template
));
296
selector => Assert.Equal("Index", selector.AttributeRouteModel.
Template
),
297
selector => Assert.Equal("", selector.AttributeRouteModel.
Template
));
305
selector => Assert.Equal("Admin/Index/some-template", selector.AttributeRouteModel.
Template
),
306
selector => Assert.Equal("Admin/some-template", selector.AttributeRouteModel.
Template
));
341
selector => Assert.Equal("some-other-prefix", selector.AttributeRouteModel.
Template
));
349
selector => Assert.Equal("some-prefix", selector.AttributeRouteModel.
Template
));
416
selector => Assert.Equal("_About", selector.AttributeRouteModel.
Template
));
431
selector => Assert.Equal("Home", selector.AttributeRouteModel.
Template
));
ApplicationModels\PageRouteModelFactoryTest.cs (7)
29
selector => Assert.Equal("Users/Profile/{id?}", selector.AttributeRouteModel.
Template
));
57
selector => Assert.Equal("Users/Profile/Index/{id?}", selector.AttributeRouteModel.
Template
),
58
selector => Assert.Equal("Users/Profile/{id?}", selector.AttributeRouteModel.
Template
));
86
selector => Assert.Equal("my-override", selector.AttributeRouteModel.
Template
));
115
selector => Assert.Equal("TestArea/Users/Profile/{id?}", selector.AttributeRouteModel.
Template
));
149
selector => Assert.Equal("TestArea/Users/Profile/Index/{id?}", selector.AttributeRouteModel.
Template
),
150
selector => Assert.Equal("TestArea/Users/Profile/{id?}", selector.AttributeRouteModel.
Template
));
DependencyInjection\PageConventionCollectionExtensionsTest.cs (7)
894
Assert.Equal("Index", selector.AttributeRouteModel.
Template
);
899
Assert.Equal("", selector.AttributeRouteModel.
Template
);
904
Assert.Equal("Different-Route", selector.AttributeRouteModel.
Template
);
914
Assert.Equal("About", selector.AttributeRouteModel.
Template
);
955
Assert.Equal("Profile", selector.AttributeRouteModel.
Template
);
965
Assert.Equal("Accounts/Profile", selector.AttributeRouteModel.
Template
);
970
Assert.Equal("Different-Route", selector.AttributeRouteModel.
Template
);