21 instantiations of PageRouteModel
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (2)
33
var routeModel = new
PageRouteModel
(relativePath, viewEnginePath);
47
var routeModel = new
PageRouteModel
(relativePath, areaResult.viewEnginePath, areaResult.areaName);
Microsoft.AspNetCore.Mvc.RazorPages (2)
ApplicationModels\PageRouteModelFactory.cs (2)
33
var routeModel = new
PageRouteModel
(relativePath, viewEnginePath);
47
var routeModel = new
PageRouteModel
(relativePath, areaResult.viewEnginePath, areaResult.areaName);
Microsoft.AspNetCore.Mvc.RazorPages.Test (17)
ApplicationModels\PageRouteTransformerConventionTest.cs (2)
18
var model = new
PageRouteModel
(string.Empty, string.Empty);
34
var model = new
PageRouteModel
(string.Empty, string.Empty);
DependencyInjection\PageConventionCollectionExtensionsTest.cs (4)
865
new
PageRouteModel
("/Pages/Index.cshtml", "/Index")
873
new
PageRouteModel
("/Pages/About.cshtml", "/About")
927
new
PageRouteModel
("/Pages/Profile.cshtml", "/Profile")
934
new
PageRouteModel
("/Areas/Accounts/Pages/Profile.cshtml", "/Profile", "Accounts")
Infrastructure\PageActionDescriptorProviderTest.cs (11)
36
var model = new
PageRouteModel
("/Test.cshtml", "/Test")
71
var model = new
PageRouteModel
("/Test.cshtml", "/Test")
120
var model = new
PageRouteModel
("/Areas/Accounts/Pages/Test.cshtml", "/Test", "Accounts")
173
var model = new
PageRouteModel
("/Areas/Accounts/Pages/Test.cshtml", "/Test", "Accounts")
207
var model = new
PageRouteModel
("/Test.cshtml", "/Test", "Accounts")
240
new
PageRouteModel
("/base-path/Test.cshtml", "/base-path/Test")
247
new
PageRouteModel
("/base-path/Index.cshtml", "/base-path/Index")
255
new
PageRouteModel
("/base-path/Admin/Index.cshtml", "/base-path/Admin/Index")
263
new
PageRouteModel
("/base-path/Admin/User.cshtml", "/base-path/Admin/User")
308
new
PageRouteModel
("/Catalog/Details/Index.cshtml", "/Catalog/Details/Index")
346
return new
PageRouteModel
("/Home.cshtml", "/Home")
72 references to PageRouteModel
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (7)
RazorProjectPageRouteModelProvider.cs (2)
72
var
routeModel = _routeModelFactory.CreateRouteModel(relativePath, routeTemplate);
98
var
routeModel = _routeModelFactory.CreateAreaRouteModel(relativePath, routeTemplate);
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (5)
30
public
PageRouteModel
CreateRouteModel(string relativePath, string? routeTemplate)
33
var
routeModel = new PageRouteModel(relativePath, viewEnginePath);
40
public
PageRouteModel
? CreateAreaRouteModel(string relativePath, string? routeTemplate)
47
var
routeModel = new PageRouteModel(relativePath, areaResult.viewEnginePath, areaResult.areaName);
56
private static void PopulateRouteModel(
PageRouteModel
model, string pageRoute, string? routeTemplate)
Microsoft.AspNetCore.Mvc.RazorPages (45)
ApplicationModels\CompiledPageRouteModelProvider.cs (1)
100
PageRouteModel
? routeModel = null;
ApplicationModels\IPageRouteModelConvention.cs (4)
7
/// Allows customization of the <see cref="
PageRouteModel
"/>.
12
/// Called to apply the convention to the <see cref="
PageRouteModel
"/>.
14
/// <param name="model">The <see cref="
PageRouteModel
"/>.</param>
15
void Apply(
PageRouteModel
model);
ApplicationModels\IPageRouteModelProvider.cs (2)
33
/// Executed for the first pass of building <see cref="
PageRouteModel
"/> instances. See <see cref="Order"/>.
39
/// Executed for the second pass of building <see cref="
PageRouteModel
"/> instances. See <see cref="Order"/>.
ApplicationModels\PageConventionCollection.cs (16)
144
/// <see cref="
PageRouteModel
"/> for the page with the specified name.
149
public IPageRouteModelConvention AddPageRouteModelConvention(string pageName, Action<
PageRouteModel
> action)
160
/// <see cref="
PageRouteModel
"/> for the page with the specified name located in the specified area.
172
public IPageRouteModelConvention AddAreaPageRouteModelConvention(string areaName, string pageName, Action<
PageRouteModel
> action)
185
/// <see cref="
PageRouteModel
"/> instances for all page under the specified folder.
190
public IPageRouteModelConvention AddFolderRouteModelConvention(string folderPath, Action<
PageRouteModel
> action)
201
/// <see cref="
PageRouteModel
"/> instances for all page under the specified area folder.
213
public IPageRouteModelConvention AddAreaFolderRouteModelConvention(string areaName, string folderPath, Action<
PageRouteModel
> action)
281
private readonly Action<
PageRouteModel
> _action;
283
public PageRouteModelConvention(string path, Action<
PageRouteModel
> action)
288
public PageRouteModelConvention(string? areaName, string path, Action<
PageRouteModel
> action)
295
public void Apply(
PageRouteModel
model)
309
private readonly Action<
PageRouteModel
> _action;
311
public FolderRouteModelConvention(string folderPath, Action<
PageRouteModel
> action)
316
public FolderRouteModelConvention(string? areaName, string folderPath, Action<
PageRouteModel
> action)
323
public void Apply(
PageRouteModel
model)
ApplicationModels\PageRouteModel.cs (6)
16
/// Initializes a new instance of <see cref="
PageRouteModel
"/>.
26
/// Initializes a new instance of <see cref="
PageRouteModel
"/>.
43
/// A copy constructor for <see cref="
PageRouteModel
"/>.
45
/// <param name="other">The <see cref="
PageRouteModel
"/> to copy from.</param>
46
public PageRouteModel(
PageRouteModel
other)
84
/// Stores arbitrary metadata properties associated with the <see cref="
PageRouteModel
"/>.
ApplicationModels\PageRouteModelFactory.cs (5)
30
public
PageRouteModel
CreateRouteModel(string relativePath, string? routeTemplate)
33
var
routeModel = new PageRouteModel(relativePath, viewEnginePath);
40
public
PageRouteModel
? CreateAreaRouteModel(string relativePath, string? routeTemplate)
47
var
routeModel = new PageRouteModel(relativePath, areaResult.viewEnginePath, areaResult.areaName);
56
private static void PopulateRouteModel(
PageRouteModel
model, string pageRoute, string? routeTemplate)
ApplicationModels\PageRouteModelProviderContext.cs (3)
12
/// Gets the <see cref="
PageRouteModel
"/> instances.
14
public IList<
PageRouteModel
> RouteModels { get; } = new List<
PageRouteModel
>();
ApplicationModels\PageRouteTransformerConvention.cs (3)
10
/// to use the specified <see cref="IOutboundParameterTransformer"/> on <see cref="
PageRouteModel
"/>.
29
public void Apply(
PageRouteModel
model)
42
protected virtual bool ShouldApply(
PageRouteModel
action) => true;
DependencyInjection\PageConventionCollectionExtensions.cs (1)
422
private static Action<
PageRouteModel
> AddPageRouteThunk(string route)
Infrastructure\PageActionDescriptorProvider.cs (4)
58
/// <returns>The list of <see cref="
PageRouteModel
"/>.</returns>
59
protected IList<
PageRouteModel
> BuildModel()
81
private void AddActionDescriptors(IList<ActionDescriptor> actions,
PageRouteModel
model)
127
private static string? TransformPageRoute(
PageRouteModel
model, SelectorModel selectorModel)
Microsoft.AspNetCore.Mvc.RazorPages.Test (20)
ApplicationModels\PageRouteModelFactoryTest.cs (5)
20
var
routeModel = routeModelFactory.CreateRouteModel(relativePath, "{id?}");
49
var
routeModel = routeModelFactory.CreateRouteModel(relativePath, "{id?}");
78
var
routeModel = routeModelFactory.CreateRouteModel(relativePath, "/my-override");
106
var
routeModel = routeModelFactory.CreateAreaRouteModel(relativePath, "{id?}");
140
var
routeModel = routeModelFactory.CreateAreaRouteModel(relativePath, "{id?}");
ApplicationModels\PageRouteTransformerConventionTest.cs (3)
18
var
model = new PageRouteModel(string.Empty, string.Empty);
34
var
model = new PageRouteModel(string.Empty, string.Empty);
57
protected override bool ShouldApply(
PageRouteModel
action)
DependencyInjection\PageConventionCollectionExtensionsTest.cs (2)
997
private static void ApplyConventions(PageConventionCollection conventions,
PageRouteModel
[] models)
1001
foreach (
var
model in models)
Infrastructure\PageActionDescriptorProviderTest.cs (10)
36
var
model = new PageRouteModel("/Test.cshtml", "/Test")
71
var
model = new PageRouteModel("/Test.cshtml", "/Test")
120
var
model = new PageRouteModel("/Areas/Accounts/Pages/Test.cshtml", "/Test", "Accounts")
173
var
model = new PageRouteModel("/Areas/Accounts/Pages/Test.cshtml", "/Test", "Accounts")
207
var
model = new PageRouteModel("/Test.cshtml", "/Test", "Accounts")
344
private static
PageRouteModel
CreateModel()
376
private readonly
PageRouteModel
[] _models;
378
public TestPageRouteModelProvider(params
PageRouteModel
[] models)
380
_models = models ?? Array.Empty<
PageRouteModel
>();
391
foreach (
var
model in _models)