ערוך

שתף באמצעות


XPathMessageFilterTable<TFilterData>.Item[MessageFilter] Property

Definition

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

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

Applies to