Επεξεργασία

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


MessageFilterTable<TFilterData>.GetMatchingFilters Method

Definition

Returns a value that indicates whether the match criterion of a MessageFilter in the table is satisfied by the specified message or buffered message, and adds the matching filters to a collection.

Overloads

GetMatchingFilters(Message, ICollection<MessageFilter>)

Returns a value that indicates whether the match criterion of an MessageFilter in the table is satisfied by the specified message, and adds the matching filters to a collection.

GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)

Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified buffered message and adds the matching filters from the highest priority set of filters in which at least one match is found to a collection.

Remarks

Use this method when more than one filter is expected to match the message and the matching filters are required.

GetMatchingFilters(Message, ICollection<MessageFilter>)

Returns a value that indicates whether the match criterion of an MessageFilter in the table is satisfied by the specified message, and adds the matching filters to a collection.

public:
 virtual bool GetMatchingFilters(System::ServiceModel::Channels::Message ^ message, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.ServiceModel.Channels.Message message, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
abstract member GetMatchingFilters : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
override this.GetMatchingFilters : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
Public Function GetMatchingFilters (message As Message, results As ICollection(Of MessageFilter)) As Boolean

Parameters

message
Message

The Message to test.

results
ICollection<MessageFilter>

The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

Returns

true if match criterion of at least one MessageFilter in the table is satisfied by message; false if no filter is satisfied.

Implements

Exceptions

results is null.

A filter attempted to examine the contents of the message body.

Remarks

Use this method when more than one filter is expected to match the message and the matching filters are required.

This method tests for all of the matching filters in the highest priority bucket of filters in which at least one match occurs.

The filters in the table are not allowed to inspect the message body.

The matching MessageFilter objects are stored in the results parameter of ICollection<T>. The FilterData can then be recovered from the filter table using these filters as keys with the methods provided by IDictionary<TKey,TValue>.

This method implements GetMatchingFilters.

Applies to

GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)

Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified buffered message and adds the matching filters from the highest priority set of filters in which at least one match is found to a collection.

public:
 virtual bool GetMatchingFilters(System::ServiceModel::Channels::MessageBuffer ^ buffer, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.ServiceModel.Channels.MessageBuffer buffer, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
abstract member GetMatchingFilters : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
override this.GetMatchingFilters : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
Public Function GetMatchingFilters (buffer As MessageBuffer, results As ICollection(Of MessageFilter)) As Boolean

Parameters

buffer
MessageBuffer

The MessageBuffer to test.

results
ICollection<MessageFilter>

The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

Returns

true if match criterion of at least one filter in the table is satisfied by message; false if no filter is satisfied.

Implements

Exceptions

results is null.

Remarks

Use this method when more than one filter is expected to match the buffered message and the matching filters are required.

The filters in the table are allowed to inspect the message body.

The matching MessageFilter objects are stored in the results parameter of ICollection<T>. The FilterData can then be recovered from the filter table using these filters as keys with the methods provided by IDictionary<TKey,TValue>.

This method implements GetMatchingFilters.

Applies to