TypeFilterAttribute Clase
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Filtro que crea otro filtro de tipo ImplementationType, recuperando argumentos de constructor que faltan de la inserción de dependencias si está disponible allí.
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
- Herencia
-
TypeFilterAttribute
- Derivado
- Atributos
- Implementaciones
Comentarios
Se usa principalmente en FilterCollection.Add las llamadas.
De forma similar a ServiceFilterAttribute en que ambos usan la inserción de constructores. Use ServiceFilterAttribute en su lugar si el filtro es en sí mismo un servicio.
Constructores
TypeFilterAttribute(Type) |
Crea una instancia de una nueva TypeFilterAttribute instancia. |
Propiedades
Arguments |
Obtiene o establece los argumentos que no son de servicio que se van a pasar al ImplementationType constructor. |
ImplementationType |
Obtiene el Type de filtro que se va a crear. |
IsReusable |
Obtiene un valor que indica si el resultado de CreateInstance(IServiceProvider) se puede reutilizar entre solicitudes. |
Order |
Obtiene el valor de orden para determinar el orden de ejecución de filtros. Los filtros se ejecutan en un valor numérico ascendente de la Order propiedad . |
Métodos
CreateInstance(IServiceProvider) |
Crea una instancia del filtro ejecutable. |