共用方式為


PageConventionCollectionExtensions.ConfigureFilter 方法

定義

多載

ConfigureFilter(PageConventionCollection, IFilterMetadata)

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

ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>)

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

ConfigureFilter(PageConventionCollection, IFilterMetadata)

來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs

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

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection ConfigureFilter (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter);
static member ConfigureFilter : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function ConfigureFilter (conventions As PageConventionCollection, filter As IFilterMetadata) As PageConventionCollection

參數

filter
IFilterMetadata

要加入的 IFilterMetadata

傳回

PageConventionCollection

適用於

ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>)

來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs

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

public static Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention ConfigureFilter (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, Func<Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel,Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> factory);
static member ConfigureFilter : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * Func<Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention
<Extension()>
Public Function ConfigureFilter (conventions As PageConventionCollection, factory As Func(Of PageApplicationModel, IFilterMetadata)) As IPageApplicationModelConvention

參數

factory
Func<PageApplicationModel,IFilterMetadata>

要建立篩選的處理站。

傳回

適用於