PageConventionCollection.AddAreaPageApplicationModelConvention 方法

定义

创建并添加一个 , IPageApplicationModelConvention 用于调用页面上的 操作 PageApplicationModel ,其指定名称位于指定区域中。

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

参数

areaName
String

区域的名称。

pageName
String

页面名称,例如 /Users/List

页面名称是不带扩展名的文件的路径,相对于指定区域的 pages 根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的页面名称为 /Manage/Accounts

返回

添加的 IPageApplicationModelConvention

适用于