PageConventionCollection.AddFolderApplicationModelConvention 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建并添加一个 , 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/
- action
- Action<PageApplicationModel>
返回
添加的 IPageApplicationModelConvention。