ServiceFilterAttribute Class¶
A filter that finds another filter in an System.IServiceProvider
.
- Namespace
Microsoft.AspNetCore.Mvc
- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Inheritance Hierarchy¶
System.Object
System.Attribute
Microsoft.AspNetCore.Mvc.ServiceFilterAttribute
Syntax¶
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
[DebuggerDisplay("ServiceFilter: Type={ServiceType} Order={Order}")]
public class ServiceFilterAttribute : Attribute, _Attribute, IFilterFactory, IOrderedFilter, IFilterMetadata
-
class
Microsoft.AspNetCore.Mvc.
ServiceFilterAttribute
Constructors¶
-
ServiceFilterAttribute
(System.Type)¶ Instantiates a new
Microsoft.AspNetCore.Mvc.ServiceFilterAttribute
instance.Arguments: type (System.Type) – The System.Type
of filter to find.public ServiceFilterAttribute(Type type)
-
Methods¶
-
CreateInstance
(System.IServiceProvider)¶ Return type: Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ServiceFilterAttribute.
IsReusable
¶ Return type: System.Boolean public bool IsReusable { get; set; }
-
Microsoft.AspNetCore.Mvc.ServiceFilterAttribute.
Order
¶ Return type: System.Int32 public int Order { get; set; }
-
Microsoft.AspNetCore.Mvc.ServiceFilterAttribute.
ServiceType
¶ Gets the
System.Type
of filter to find.Return type: System.Type public Type ServiceType { get; }
-