Udostępnij za pośrednictwem


PageConventionCollection.AddPageRouteModelConvention Metoda

Definicja

Tworzy i dodaje element IPageRouteModelConvention , który wywołuje akcję na PageRouteModel stronie o określonej nazwie.

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

Parametry

pageName
String

Nazwa strony, np. /Users/List

action
Action<PageRouteModel>

Element Action.

Zwraca

Dodano element IPageRouteModelConvention.

Dotyczy