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