PageConventionCollection.AddFolderApplicationModelConvention 方法

定义

创建并添加一个 , IPageApplicationModelConvention 用于对 PageApplicationModel 指定文件夹下的所有页面的 实例调用操作。

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

参数

folderPath
String

相对于 Razor Pages 根的文件夹的路径。 例如,/Users/

返回

添加的 IPageApplicationModelConvention

适用于