共用方式為


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 的 。

適用於