Bagikan melalui


PageConventionCollection.AddFolderRouteModelConvention Metode

Definisi

Membuat dan menambahkan IPageRouteModelConvention yang memanggil tindakan pada PageRouteModel instans untuk semua halaman di bawah folder yang ditentukan.

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

Parameter

folderPath
String

Jalur folder relatif terhadap akar Halaman Razor. Mis. /Users/

Mengembalikan

yang ditambahkan IPageApplicationModelConvention.

Berlaku untuk