Redigera

Dela via


MessageFilterTable<TFilterData>.Add Method

Definition

Adds a filter and its associated FilterData to the filter table.

Overloads

Add(KeyValuePair<MessageFilter,TFilterData>)

Adds a filter/FilterData (key/value) pair to the filter table.

Add(MessageFilter, TFilterData)

Adds a filter and its associated FilterData to the filter table.

Add(MessageFilter, TFilterData, Int32)

Adds a filter and its associated FilterData to the action filter table with a specified priority.

Add(KeyValuePair<MessageFilter,TFilterData>)

Adds a filter/FilterData (key/value) pair to the filter table.

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> added to the table.

Implements

Exceptions

item is null.

Applies to

Add(MessageFilter, TFilterData)

Adds a filter and its associated FilterData 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.

data
TFilterData

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

Implements

Exceptions

filter is null.

filter is already in the table.

Remarks

This assigns the filter a default priority. To specify the priority, use Add.

Applies to

Add(MessageFilter, TFilterData, Int32)

Adds a filter and its associated FilterData to the action filter table with a specified priority.

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

Parameters

filter
MessageFilter

The MessageFilter used as the key of the pair added.

data
TFilterData

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

priority
Int32

The priority of the filter added.

Exceptions

filter cannot be null.

filter already exists in the table.

filter type does not match table type.

Remarks

The priority is an integer value used to group filters into priority buckets and order their processing. The larger the integer assigned to a filter type, the higher its priority for processing. All the filter tables in a priority bucket are evaluated together. Lower priority buckets are only evaluated if higher priority buckets do not provide any matches. Use Add to add a filter with the default priority. The default priority can be set using DefaultPriority. The default is initially set to 0.

Applies to