共用方式為


PageConventionCollection.AddFolderApplicationModelConvention 方法

定義

建立並新增 , IPageApplicationModelConvention 在指定資料夾下的所有頁面的實例上 PageApplicationModel 叫用動作。

public:
 Microsoft::AspNetCore::Mvc::ApplicationModels::IPageApplicationModelConvention ^ AddFolderApplicationModelConvention(System::String ^ folderPath, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageApplicationModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddFolderApplicationModelConvention (string folderPath, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel> action);
member this.AddFolderApplicationModelConvention : string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention
Public Function AddFolderApplicationModelConvention (folderPath As String, action As Action(Of PageApplicationModel)) As IPageApplicationModelConvention

參數

folderPath
String

相對於 Razor Pages 根目錄的資料夾路徑。 例如,/Users/

傳回

加入 IPageApplicationModelConvention 的 。

適用於