TypeFilterAttribute Class
Definition
A filter that creates another filter of type ImplementationType, retrieving missing constructor arguments from dependency injection if available there.
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
- Inheritance
-
TypeFilterAttribute
- Attributes
- Implements
Remarks
Primarily used in FilterCollection.Add calls.
Similar to the ServiceFilterAttribute in that both use constructor injection. Use ServiceFilterAttribute instead if the filter is itself a service.
Constructors
TypeFilterAttribute(Type) |
Instantiates a new TypeFilterAttribute instance. |
Properties
Arguments |
Gets or sets the non-service arguments to pass to the ImplementationType constructor. |
ImplementationType |
Gets the Type of filter to create. |
IsReusable | |
Order |
Methods
CreateInstance(IServiceProvider) |