PageConventionCollection.AddPageApplicationModelConvention 方法

定义

创建并添加一个 , IPageApplicationModelConvention 用于为具有指定名称的页面调用 操作 PageApplicationModel

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

参数

pageName
String

页面的名称,例如 /Users/List

返回

添加了 IPageApplicationModelConvention

适用于