36 instantiations of AttributeRouteModel
ApiExplorerWebSite (1)
ApiExplorerRouteChangeConvention.cs (1)
25AttributeRouteModel = new AttributeRouteModel
Microsoft.AspNetCore.Mvc.Core (4)
ApplicationModels\AttributeRouteModel.cs (2)
18private static readonly AttributeRouteModel _default = new AttributeRouteModel(); 123return new AttributeRouteModel()
ApplicationModels\DefaultApplicationModelProvider.cs (1)
625selectorModel.AttributeRouteModel = new AttributeRouteModel(route);
ApplicationModels\SelectorModel.cs (1)
35AttributeRouteModel = new AttributeRouteModel(other.AttributeRouteModel);
Microsoft.AspNetCore.Mvc.Core.Test (20)
ApplicationModels\ActionModelTest.cs (1)
27var route = new AttributeRouteModel(new HttpGetAttribute("api/Products"));
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (4)
46Selectors = { new SelectorModel { AttributeRouteModel = new AttributeRouteModel() } }, 54Selectors = { new SelectorModel { AttributeRouteModel = new AttributeRouteModel() } }, 89Selectors = { new SelectorModel { AttributeRouteModel = new AttributeRouteModel() } }, 97Selectors = { new SelectorModel { AttributeRouteModel = new AttributeRouteModel() } },
ApplicationModels\AttributeRouteModelTests.cs (11)
14var route = new AttributeRouteModel(new HttpGetAttribute("/api/Products")) 23var route2 = new AttributeRouteModel(route); 284var left = new AttributeRouteModel 288var right = new AttributeRouteModel(); 302var left = new AttributeRouteModel 307var right = new AttributeRouteModel 321var left = new AttributeRouteModel 325var right = new AttributeRouteModel(); 339var left = new AttributeRouteModel 344var right = new AttributeRouteModel 792return new AttributeRouteModel
ApplicationModels\ControllerActionDescriptorProviderTests.cs (1)
1956AttributeRouteModel = new AttributeRouteModel()
ApplicationModels\ControllerModelTest.cs (1)
29var route = new AttributeRouteModel(new HttpGetAttribute("api/Products"));
ApplicationModels\RouteTokenTransformerConventionTest.cs (2)
21AttributeRouteModel = new AttributeRouteModel() 41AttributeRouteModel = new AttributeRouteModel()
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (1)
162AttributeRouteModel = new AttributeRouteModel
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\PageRouteModelFactory.cs (1)
162AttributeRouteModel = new AttributeRouteModel
DependencyInjection\PageConventionCollectionExtensions.cs (1)
434AttributeRouteModel = new AttributeRouteModel
Microsoft.AspNetCore.Mvc.RazorPages.Test (8)
DependencyInjection\PageConventionCollectionExtensionsTest.cs (1)
989AttributeRouteModel = new AttributeRouteModel
Infrastructure\PageActionDescriptorProviderTest.cs (7)
42AttributeRouteModel = new AttributeRouteModel 81AttributeRouteModel = new AttributeRouteModel 131AttributeRouteModel = new AttributeRouteModel 179AttributeRouteModel = new AttributeRouteModel(), 213AttributeRouteModel = new AttributeRouteModel(), 296AttributeRouteModel = new AttributeRouteModel 352AttributeRouteModel = new AttributeRouteModel
105 references to AttributeRouteModel
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
160AttributeRouteModel.ReplaceTokens(token.ValueText, new Dictionary<string, string>
Microsoft.AspNetCore.Mvc.Core (29)
ApplicationModels\ActionAttributeRouteModel.cs (12)
58var actionRouteModel = actionSelector.AttributeRouteModel; 69selector.AttributeRouteModel = AttributeRouteModel.CombineAttributeRouteModel( 87selector.AttributeRouteModel = AttributeRouteModel.CombineAttributeRouteModel( 106selector.AttributeRouteModel = AttributeRouteModel.CombineAttributeRouteModel( 143public static IEnumerable<(AttributeRouteModel? route, SelectorModel actionSelector, SelectorModel? controllerSelector)> GetAttributeRoutes(ActionModel actionModel) 152var actionRouteModel = actionSelectorModel.AttributeRouteModel; 159var route = AttributeRouteModel.CombineAttributeRouteModel( 172var route = AttributeRouteModel.CombineAttributeRouteModel( 181var route = AttributeRouteModel.CombineAttributeRouteModel(
ApplicationModels\ApplicationModelFactory.cs (2)
147selector.AttributeRouteModel.Template = AttributeRouteModel.ReplaceTokens( 154selector.AttributeRouteModel.Name = AttributeRouteModel.ReplaceTokens(
ApplicationModels\AttributeRouteModel.cs (14)
18private static readonly AttributeRouteModel _default = new AttributeRouteModel(); 44/// <param name="other">The <see cref="AttributeRouteModel"/> to copy.</param> 45public AttributeRouteModel(AttributeRouteModel other) 94/// Combines two <see cref="AttributeRouteModel"/> instances and returns 95/// a new <see cref="AttributeRouteModel"/> instance with the result. 97/// <param name="left">The left <see cref="AttributeRouteModel"/>.</param> 98/// <param name="right">The right <see cref="AttributeRouteModel"/>.</param> 99/// <returns>A new instance of <see cref="AttributeRouteModel"/> that represents the 100/// combination of the two <see cref="AttributeRouteModel"/> instances or <c>null</c> if both 102public static AttributeRouteModel? CombineAttributeRouteModel( 103AttributeRouteModel? left, 104AttributeRouteModel? right) 161AttributeRouteModel left, 162AttributeRouteModel right)
ApplicationModels\SelectorModel.cs (1)
42public AttributeRouteModel? AttributeRouteModel { get; set; }
Microsoft.AspNetCore.Mvc.Core.Test (70)
ApplicationModels\ActionModelTest.cs (1)
27var route = new AttributeRouteModel(new HttpGetAttribute("api/Products"));
ApplicationModels\AttributeRouteModelTests.cs (61)
14var route = new AttributeRouteModel(new HttpGetAttribute("/api/Products")) 23var route2 = new AttributeRouteModel(route); 26foreach (var property in typeof(AttributeRouteModel).GetProperties()) 75var combined = AttributeRouteModel.CombineTemplates(left, right); 100var combined = AttributeRouteModel.CombineTemplates(left, right); 116var combined = AttributeRouteModel.CombineTemplates(left, right); 140var combined = AttributeRouteModel.CombineTemplates(left, right); 152var result = AttributeRouteModel.ReplaceTokens(template, values); 171() => { AttributeRouteModel.ReplaceTokens(template, values); }); 198() => { AttributeRouteModel.ReplaceTokens(template, values); }); 207AttributeRouteModel left, 208AttributeRouteModel right, 212var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 222AttributeRouteModel left, 223AttributeRouteModel right, 224AttributeRouteModel expectedResult) 227var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 237AttributeRouteModel left, 238AttributeRouteModel right) 241var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 250AttributeRouteModel left, 251AttributeRouteModel right) 254var expectedTemplate = AttributeRouteModel.CombineTemplates(null, right.Template); 257var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 268AttributeRouteModel left, 269AttributeRouteModel right, 273var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 284var left = new AttributeRouteModel 288var right = new AttributeRouteModel(); 289var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 302var left = new AttributeRouteModel 307var right = new AttributeRouteModel 311var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 321var left = new AttributeRouteModel 325var right = new AttributeRouteModel(); 326var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 339var left = new AttributeRouteModel 344var right = new AttributeRouteModel 348var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); 359var data = new TheoryData<AttributeRouteModel, AttributeRouteModel, string>(); 412var data = new TheoryData<AttributeRouteModel, AttributeRouteModel, int?>(); 441var data = new TheoryData<AttributeRouteModel, AttributeRouteModel>(); 442var leftModel = Create("Home", order: 3); 460var data = new TheoryData<AttributeRouteModel, AttributeRouteModel>(); 476var data = new TheoryData<AttributeRouteModel, AttributeRouteModel, AttributeRouteModel>(); 790private static AttributeRouteModel Create(string template, int? order = null, string name = null)
ApplicationModels\ControllerModelTest.cs (1)
29var route = new AttributeRouteModel(new HttpGetAttribute("api/Products"));
ApplicationModels\DefaultApplicationModelProviderTest.cs (7)
446var route = Assert.Single(attributeRoutes, r => r.Template == "A"); 468var route = Assert.Single(attributeRoutes, r => r.Template == "C"); 881var attributeRoute = Assert.Single(GetAttributeRoutes(action.Selectors)); 905var attributeRoute = Assert.Single(GetAttributeRoutes(action.Selectors)); 934var attributeRoute = Assert.Single(GetAttributeRoutes(action.Selectors)); 1068var attributeRoute = Assert.Single(GetAttributeRoutes(action.Selectors)); 1384private IList<AttributeRouteModel> GetAttributeRoutes(IList<SelectorModel> selectors)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (2)
64if (!AttributeRouteModel.IsOverridePattern(routeTemplate) && 164Template = AttributeRouteModel.CombineTemplates(prefix, routeTemplate),
Microsoft.AspNetCore.Mvc.RazorPages (3)
ApplicationModels\PageRouteModelFactory.cs (2)
64if (!AttributeRouteModel.IsOverridePattern(routeTemplate) && 164Template = AttributeRouteModel.CombineTemplates(prefix, routeTemplate),
Infrastructure\PageActionDescriptorProvider.cs (1)
153return AttributeRouteModel.CombineTemplates(transformedPageRoute, pageRouteMetadata.RouteTemplate);