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

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; }

Parameters

filter
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.

Implements

IDictionary<TKey, TValue>.Item[TKey]
ExceptionCondition
ArgumentNullException

filter is null.

KeyNotFoundException

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.

myFilters[filter]

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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.