PageConventionCollection.AddAreaFolderRouteModelConvention 方法

定义

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

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

参数

areaName
String

区域名称。

folderPath
String

文件夹路径,例如 /Manage/

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

返回

添加了 IPageApplicationModelConvention

适用于