XPathMessageFilterTable<TFilterData>.Item[MessageFilter] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the filter data associated with the specified filter
.
public:
property TFilterData default[System::ServiceModel::Dispatcher::MessageFilter ^] { TFilterData get(System::ServiceModel::Dispatcher::MessageFilter ^ filter); void set(System::ServiceModel::Dispatcher::MessageFilter ^ filter, TFilterData value); };
public TFilterData this[System.ServiceModel.Dispatcher.MessageFilter filter] { get; set; }
member this.Item(System.ServiceModel.Dispatcher.MessageFilter) : 'FilterData with get, set
Default Public Property Item(filter As MessageFilter) As TFilterData
Parameters
- filter
- MessageFilter
The MessageFilter associated with the filter data to get or set.
Property Value
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 key.
Implements
Exceptions
filter
is null
.
A compiler error occurred.
The property is retrieved and the filter
is not in the table.
Remarks
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]
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
/filter data pair in the case of XPathMessageFilterTable<TFilterData>.