Dela via


PageConventionCollection.AddFolderApplicationModelConvention Method

Definition

Creates and adds an IPageApplicationModelConvention that invokes an action on PageApplicationModel instances for all page under the specified folder.

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

Parameters

folderPath
String

The path of the folder relative to the Razor Pages root. e.g. /Users/

Returns

The added IPageApplicationModelConvention.

Applies to