PageConventionCollection.AddAreaFolderApplicationModelConvention 方法

定义

创建并添加一个 , IPageApplicationModelConvention 用于在指定区域文件夹下的所有页面的实例上 PageApplicationModel 调用操作。

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

参数

areaName
String

区域的名称。

folderPath
String

文件夹路径,例如 /Manage/

文件夹路径是文件夹的路径,相对于指定区域的页根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的文件夹路径为 /Manage

返回

添加了 IPageApplicationModelConvention

适用于