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)

実行可能フィルターのインスタンスを作成します。

適用対象