Dela via


PageConventionCollection.AddAreaFolderApplicationModelConvention Method

Definition

Creates and adds an IPageApplicationModelConvention that invokes an action on PageApplicationModel instances for all pages under the specified area folder.

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

Parameters

areaName
String

The name of area.

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