PageConventionCollectionExtensions.ConfigureFilter 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ConfigureFilter(PageConventionCollection, IFilterMetadata) |
将指定的 |
ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>) |
将指定的 |
ConfigureFilter(PageConventionCollection, IFilterMetadata)
将指定的 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
参数
- conventions
- PageConventionCollection
要配置的 PageConventionCollection。
- filter
- IFilterMetadata
要添加的 IFilterMetadata。
返回
适用于
ConfigureFilter(PageConventionCollection, Func<PageApplicationModel,IFilterMetadata>)
将指定的 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
参数
- conventions
- PageConventionCollection
要配置的 PageConventionCollection。
- factory
- Func<PageApplicationModel,IFilterMetadata>
要创建筛选器的工厂。