PageConventionCollection.AddFolderApplicationModelConvention 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立並新增 , 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/
- action
- Action<PageApplicationModel>
傳回
加入 IPageApplicationModelConvention 的 。