PageConventionCollection.AddFolderRouteModelConvention 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建并添加一个 , IPageRouteModelConvention 用于对 PageRouteModel 指定文件夹下的所有页面的 实例调用操作。
public:
Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddFolderRouteModelConvention(System::String ^ folderPath, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddFolderRouteModelConvention (string folderPath, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);
member this.AddFolderRouteModelConvention : string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention
Public Function AddFolderRouteModelConvention (folderPath As String, action As Action(Of PageRouteModel)) As IPageRouteModelConvention
参数
- folderPath
- String
相对于 Razor Pages 根的文件夹的路径。 例如,/Users/
- action
- Action<PageRouteModel>
返回
添加的 IPageApplicationModelConvention。