Table of Contents

Class GlobalFilterCollection

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents a class that contains all the global filters.

public sealed class GlobalFilterCollection : IEnumerable<Filter>, IEnumerable, IFilterProvider
Inheritance
GlobalFilterCollection
Implements
Inherited Members

Constructors

GlobalFilterCollection()

Initializes a new instance of the GlobalFilterCollection class.

public GlobalFilterCollection()

Properties

Count

Gets the number of filters in the global filter collection.

public int Count { get; }

Property Value

int

The number of filters in the global filter collection.

Methods

Add(object)

Adds the specified filter to the global filter collection.

public void Add(object filter)

Parameters

filter object

The filter.

Add(object, int)

Adds the specified filter to the global filter collection using the specified filter run order.

public void Add(object filter, int order)

Parameters

filter object

The filter.

order int

The filter run order.

Clear()

Removes all filters from the global filter collection.

public void Clear()

Contains(object)

Determines whether a filter is in the global filter collection.

public bool Contains(object filter)

Parameters

filter object

The filter.

Returns

bool

true if filter is found in the global filter collection; otherwise, false.

GetEnumerator()

Returns an enumerator that iterates through the global filter collection.

public IEnumerator<Filter> GetEnumerator()

Returns

IEnumerator<Filter>

An enumerator that iterates through the global filter collection.

Remove(object)

Removes all the filters that match the specified filter.

public void Remove(object filter)

Parameters

filter object

The filter to remove.