Condividi tramite


PageConventionCollection.AddFolderRouteModelConvention Metodo

Definizione

Crea e aggiunge un oggetto IPageRouteModelConvention che richiama un'azione sulle PageRouteModel istanze di per tutte le pagine nella cartella specificata.

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

Parametri

folderPath
String

Percorso della cartella rispetto alla radice di Razor Pages. Ad esempio: /Users/

action
Action<PageRouteModel>

Oggetto Action.

Restituisce

Oggetto aggiunto IPageApplicationModelConvention.

Si applica a