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