Επεξεργασία

Κοινή χρήση μέσω


XPathMessageFilterTable<TFilterData>.Add Method

Definition

Adds an XPathMessageFilter and its associated FilterData to the XPathMessageFilterTable<TFilterData>.

Overloads

Add(KeyValuePair<MessageFilter,TFilterData>)

Adds a filter/FilterData (key/value) pair to the XPathMessageFilterTable<TFilterData>.

Add(MessageFilter, TFilterData)

Adds a filter/data pair to the filter table.

Add(XPathMessageFilter, TFilterData)

Adds a filter/data pair to the filter table.

Add(KeyValuePair<MessageFilter,TFilterData>)

Adds a filter/FilterData (key/value) pair to the XPathMessageFilterTable<TFilterData>.

public:
 virtual void Add(System::Collections::Generic::KeyValuePair<System::ServiceModel::Dispatcher::MessageFilter ^, TFilterData> item);
public void Add (System.Collections.Generic.KeyValuePair<System.ServiceModel.Dispatcher.MessageFilter,TFilterData> item);
abstract member Add : System.Collections.Generic.KeyValuePair<System.ServiceModel.Dispatcher.MessageFilter, 'FilterData> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<System.ServiceModel.Dispatcher.MessageFilter, 'FilterData> -> unit
Public Sub Add (item As KeyValuePair(Of MessageFilter, TFilterData))

Parameters

item
KeyValuePair<MessageFilter,TFilterData>

The KeyValuePair<TKey,TValue> <Filter, FilterData> to add to the table.

Implements

Exceptions

filter is null.

A compiler error occurred.

Remarks

This method implements the Add method of the ICollection<T> class. The implicit conversion of the filter parameter from type MessageFilter to the XPathMessageFilter can be avoided by using the strongly-typed overload, Add.

Applies to

Add(MessageFilter, TFilterData)

Adds a filter/data pair to the filter table.

public:
 virtual void Add(System::ServiceModel::Dispatcher::MessageFilter ^ filter, TFilterData data);
public void Add (System.ServiceModel.Dispatcher.MessageFilter filter, TFilterData data);
abstract member Add : System.ServiceModel.Dispatcher.MessageFilter * 'FilterData -> unit
override this.Add : System.ServiceModel.Dispatcher.MessageFilter * 'FilterData -> unit
Public Sub Add (filter As MessageFilter, data As TFilterData)

Parameters

filter
MessageFilter

The MessageFilter used as the key of the pair added. Must be an instance of XPathMessageFilter.

data
TFilterData

The FilterData associated with the filter used as the value of the pair added.

Implements

Exceptions

filter is null.

A compiler error occurred.

Remarks

The internal conversion of the filter parameter from MessageFilter to the XPathMessageFilter can be avoided by using the strongly-typed overload, Add.

Applies to

Add(XPathMessageFilter, TFilterData)

Adds a filter/data pair to the filter table.

public:
 void Add(System::ServiceModel::Dispatcher::XPathMessageFilter ^ filter, TFilterData data);
public void Add (System.ServiceModel.Dispatcher.XPathMessageFilter filter, TFilterData data);
member this.Add : System.ServiceModel.Dispatcher.XPathMessageFilter * 'FilterData -> unit
Public Sub Add (filter As XPathMessageFilter, data As TFilterData)

Parameters

filter
XPathMessageFilter

The XPathMessageFilter used as the key of the pair added.

data
TFilterData

The FilterData associated with the filter; used as the value of the pair added.

Exceptions

filter is null.

A compiler error occurred.

Remarks

This provides a strongly-typed overload for adding an XPathMessageFilter to the filter table that performs better than the weakly-typed overload because it avoids implicit conversion of the filter parameter from type MessageFilter to the XPathMessageFilter.

Applies to