Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GlobalFilterCollection Class

Represents a class that contains all the global filters.

System::Object
  System.Web.Mvc::GlobalFilterCollection

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public ref class GlobalFilterCollection sealed : IEnumerable<Filter^>, 
	IEnumerable, IFilterProvider

The GlobalFilterCollection type exposes the following members.

  NameDescription
Public methodGlobalFilterCollectionInitializes a new instance of the GlobalFilterCollection class.
Top
  NameDescription
Public propertyCountGets the number of filters in the global filter collection.
Top
  NameDescription
Public methodAdd(Object)Adds the specified filter to the global filter collection.
Public methodAdd(Object, Int32)Adds the specified filter to the global filter collection using the specified filter run order.
Public methodClearRemoves all filters from the global filter collection.
Public methodContainsDetermines whether a filter is in the global filter collection.
Public methodEquals (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the global filter collection.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodRemoveRemoves all the filters that match the specified filter.
Public methodToString (Inherited from Object.)
Top
  NameDescription
Explicit interface implemetationPrivate methodIEnumerable::GetEnumeratorThis API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code.
Explicit interface implemetationPrivate methodIFilterProvider::GetFiltersThis API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code.
Top

Global filters run for every action of every controller. You can register a global filter using the Filters static registration endpoint.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.