This documentation is archived and is not being maintained.

MessageFilterTable<TFilterData>.GetMatchingFilters Method (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.

Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public bool GetMatchingFilters(
	MessageBuffer buffer,
	ICollection<MessageFilter> results


Type: System.ServiceModel.Channels.MessageBuffer
The MessageBuffer to test.
Type: System.Collections.Generic.ICollection<MessageFilter>
The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

Return Value

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


IMessageFilterTable<TFilterData>.GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)


results is null.

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.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.