PageConventionCollection 類別

定義

IPageConvention 集合。

public ref class PageConventionCollection : System::Collections::ObjectModel::Collection<Microsoft::AspNetCore::Mvc::ApplicationModels::IPageConvention ^>
public class PageConventionCollection : System.Collections.ObjectModel.Collection<Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention>
type PageConventionCollection = class
    inherit Collection<IPageConvention>
Public Class PageConventionCollection
Inherits Collection(Of IPageConvention)
繼承
PageConventionCollection

建構函式

PageConventionCollection()

初始化 PageConventionCollection 類別的新執行個體,這個執行個體是空白的。

PageConventionCollection(IList<IPageConvention>)

初始化 PageConventionCollection 類別的新執行個體,將其當做指定清單的包裝函式。

方法

AddAreaFolderApplicationModelConvention(String, String, Action<PageApplicationModel>)

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

AddAreaFolderRouteModelConvention(String, String, Action<PageRouteModel>)

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

AddAreaPageApplicationModelConvention(String, String, Action<PageApplicationModel>)

建立並新增 , IPageApplicationModelConvention 其會針對位於指定區域之指定名稱的 頁面上叫用動作 PageApplicationModel

AddAreaPageRouteModelConvention(String, String, Action<PageRouteModel>)

建立並新增 , IPageRouteModelConvention 其會針對位於指定區域之指定名稱的 頁面上叫用動作 PageRouteModel

AddFolderApplicationModelConvention(String, Action<PageApplicationModel>)

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

AddFolderRouteModelConvention(String, Action<PageRouteModel>)

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

AddPageApplicationModelConvention(String, Action<PageApplicationModel>)

建立並新增 , IPageApplicationModelConventionPageApplicationModel 會針對具有指定名稱的頁面叫用 動作。

AddPageRouteModelConvention(String, Action<PageRouteModel>)

建立並新增 , IPageRouteModelConventionPageRouteModel 會針對具有指定名稱的頁面叫用 動作。

RemoveType(Type)

移除指定型別的所有 IPageConvention 實例。

RemoveType<TPageConvention>()

移除指定型別的所有 IPageConvention 實例。

擴充方法

Add(PageConventionCollection, IParameterModelBaseConvention)

將指定的 convention 加入至 conventions 。 新增的慣例會套用至處理常式方法上的所有處理常式屬性和參數。

AddAreaPageRoute(PageConventionCollection, String, String, String)

將指定的 route 新增至位於 pageName 指定區域之指定位置的頁面。

除了預設路徑型路由集之外,還可以透過 route 路由傳送頁面。 針對此頁面產生的所有連結都會使用指定的路由。

AddPageRoute(PageConventionCollection, String, String)

將指定的 route 加入至頁面指定的 pageName

除了預設路徑型路由集之外,還可以透過 route 路由傳送頁面。 針對此頁面產生的所有連結都會使用指定的路由。

AllowAnonymousToAreaFolder(PageConventionCollection, String, String)

允許匿名存取指定區域資料夾下的所有頁面。

AllowAnonymousToAreaPage(PageConventionCollection, String, String)

允許匿名存取位於指定區域之指定名稱的頁面。

AllowAnonymousToFolder(PageConventionCollection, String)

允許匿名存取指定資料夾下的所有頁面。

AllowAnonymousToPage(PageConventionCollection, String)

允許匿名存取具有指定名稱的頁面。

AuthorizeAreaFolder(PageConventionCollection, String, String)

需要具有指定資料夾下所有頁面之預設原則的授權。

AuthorizeAreaFolder(PageConventionCollection, String, String, String)

需要具有指定原則的授權,以取得指定資料夾下所有頁面的授權。

AuthorizeAreaPage(PageConventionCollection, String, String)

需要指定區域頁面的授權。

AuthorizeAreaPage(PageConventionCollection, String, String, String)

需要具有指定原則之指定區域頁面的授權。

AuthorizeFolder(PageConventionCollection, String)

需要指定資料夾下所有頁面的授權。

AuthorizeFolder(PageConventionCollection, String, String)

需要指定資料夾下所有頁面的授權。

AuthorizePage(PageConventionCollection, String)

需要指定頁面的授權。

AuthorizePage(PageConventionCollection, String, String)

需要具有指定名稱之頁面之指定原則的授權。

ConfigureFilter(PageConventionCollection, IFilterMetadata)

設定要套用至所有 Razor Pages 的指定 filter

ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>)

設定指定的 factory ,將篩選套用至所有 Razor Pages。

適用於