TypeFilterAttribute 類別

定義

建立另一個類型 ImplementationType 篩選的篩選,如果有的話,從相依性插入擷取遺漏的建構函式引數。

public ref class TypeFilterAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public class TypeFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type TypeFilterAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
Public Class TypeFilterAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
繼承
TypeFilterAttribute
衍生
屬性
實作

備註

主要用於 FilterCollection.Add 呼叫中。

類似于 中的 , ServiceFilterAttribute 兩者都使用建構函式插入。 如果篩選本身是服務,請 ServiceFilterAttribute 改用 。

建構函式

TypeFilterAttribute(Type)

具現化新的 TypeFilterAttribute 實例。

屬性

Arguments

取得或設定要傳遞至建 ImplementationType 構函式的非服務引數。

ImplementationType

Type取得要建立之篩選的 。

IsReusable

取得值,這個值表示 是否可以跨要求重複使用 的結果 CreateInstance(IServiceProvider)

Order

取得決定篩選準則執行順序的順序值。 篩選會以屬性的 Order 遞增數值執行。

方法

CreateInstance(IServiceProvider)

建立可執行篩選準則的實例。

適用於