PageConventionCollection.AddPageApplicationModelConvention Method

Definition

Creates and adds an IPageApplicationModelConvention that invokes an action on the PageApplicationModel for the page with the specified name.

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

Parameters

pageName
String

The name of the page e.g. /Users/List

Returns

The added IPageApplicationModelConvention.

Applies to