PageConventionCollection.AddAreaFolderRouteModelConvention Method

Definition

Creates and adds an IPageRouteModelConvention that invokes an action on PageRouteModel instances for all page under the specified area folder.

public:
 Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddAreaFolderRouteModelConvention(System::String ^ areaName, System::String ^ folderPath, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddAreaFolderRouteModelConvention (string areaName, string folderPath, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);
member this.AddAreaFolderRouteModelConvention : string * string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention
Public Function AddAreaFolderRouteModelConvention (areaName As String, folderPath As String, action As Action(Of PageRouteModel)) As IPageRouteModelConvention

Parameters

areaName
String

The area name.

folderPath
String

The folder path e.g. /Manage/

The folder path is the path of the folder, relative to the pages root directory for the specified area. e.g. the folder path for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage.

Returns

The added IPageApplicationModelConvention.

Applies to