ServiceFilterAttribute Clase

Definición

Filtro que encuentra otro filtro en un IServiceProvider.

public ref class ServiceFilterAttribute : 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 ServiceFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ServiceFilterAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
Public Class ServiceFilterAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
Herencia
ServiceFilterAttribute
Derivado
Atributos
Implementaciones

Comentarios

Se usa principalmente en FilterCollection.AddService las llamadas.

De forma similar a TypeFilterAttribute en que ambos usan la inserción de constructores. Use TypeFilterAttribute en su lugar si el filtro no es un servicio.

Constructores

ServiceFilterAttribute(Type)

Crea una instancia de una nueva ServiceFilterAttribute instancia.

Propiedades

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 .

ServiceType

Obtiene el Type de filtro que se va a buscar.

Métodos

CreateInstance(IServiceProvider)

Crea una instancia del filtro ejecutable.

Se aplica a