PageConventionCollectionExtensions.ConfigureFilter 方法

定义

重载

ConfigureFilter(PageConventionCollection, IFilterMetadata)

将指定的 filter 配置为应用于所有 Razor Pages。

ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>)

将指定的 factory 配置为对所有 Razor 页面应用筛选器。

ConfigureFilter(PageConventionCollection, IFilterMetadata)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

将指定的 filter 配置为应用于所有 Razor Pages。

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>)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

将指定的 factory 配置为对所有 Razor 页面应用筛选器。

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>

要创建筛选器的工厂。

返回

适用于