This documentation is archived and is not being maintained.

MessageFilterTable<TFilterData>.Item Property

Gets or sets the filter data associated with the specified filter.

Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public TFilterData this[
	MessageFilter filter
] { get; set; }


Type: System.ServiceModel.Dispatcher.MessageFilter
The MessageFilter associated with the filter data to get or set.

Property Value

Type: TFilterData
The filter data associated with the filter. If the specified filter is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new filter data element with the specified filter as the key.


IDictionary<TKey, TValue>.Item[TKey]


filter is null.


The property is retrieved, and the filter is not in the table.

The Item property (the indexer in C#) provides the ability to access the filter data associated with a filter in the table's filter collection by using the following syntax.


You can also use the Item property to add new elements by setting the values of a filter/filter data pair that does not exist in the action filter table. However if filter is already in the table, setting the Item property overwrites the old value. In contrast, the Add method does not modify the filter data of an existing filter.

The dictionary item is a filter/FilterData pair in the case of MessageFilterTable<TFilterData>.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.