PageConventionCollection.AddPageRouteModelConvention 方法

定义

为具有指定名称的页面创建并添加 IPageRouteModelConvention 对 调用操作 PageRouteModel 的 。

public:
 Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddPageRouteModelConvention(System::String ^ pageName, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddPageRouteModelConvention (string pageName, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);
member this.AddPageRouteModelConvention : string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention
Public Function AddPageRouteModelConvention (pageName As String, action As Action(Of PageRouteModel)) As IPageRouteModelConvention

参数

pageName
String

页面的名称,例如 /Users/List

返回

添加的 IPageRouteModelConvention

适用于