Modifier

Partager via


IMessageFilterTable<TFilterData>.GetMatchingValues Method

Definition

Adds the filter data of the filters that match the specified message or buffered message to a collection.

Overloads

GetMatchingValues(Message, ICollection<TFilterData>)

Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified message, and adds the FilterData of the matching filters to a collection.

GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

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 FilterData of the matching filters to a collection.

Remarks

Use this method when more than one filter is expected to match and only the matching filter data is required. These methods return a boolean that indicates whether matching filters were found and put any matching filter data into a collection.

Note that the collection that contains the filter data is not cleared before the results are added. This allows you to accumulate all matches across multiple filter tables into a single collection.

Use GetMatchingValues if the contents of the message body do not require examination. Use GetMatchingValues if the contents of the message body requires examination.

GetMatchingValues(Message, ICollection<TFilterData>)

Source:
IMessageFilterTable.cs
Source:
IMessageFilterTable.cs
Source:
IMessageFilterTable.cs

Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified message, and adds the FilterData of the matching filters to a collection.

public:
 bool GetMatchingValues(System::ServiceModel::Channels::Message ^ message, System::Collections::Generic::ICollection<TFilterData> ^ results);
public bool GetMatchingValues (System.ServiceModel.Channels.Message message, System.Collections.Generic.ICollection<TFilterData> results);
abstract member GetMatchingValues : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<'FilterData> -> bool
Public Function GetMatchingValues (message As Message, results As ICollection(Of TFilterData)) As Boolean

Parameters

message
Message

The Message to test.

results
ICollection<TFilterData>

Reference parameter that stores the filter data of the matching filters in a generic collection.

Returns

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

Remarks

Use this method when one or more filters are expected to match the message, only the filter data is required, and the contents of the body of the message are not to be inspected.

The filter data of the matching MessageFilter objects is stored in the results parameter.

If the body of the message is inspected by a filter in the filter table, buffer the message and pass it to the GetMatchingValues version of the method.

Applies to

GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

Source:
IMessageFilterTable.cs
Source:
IMessageFilterTable.cs
Source:
IMessageFilterTable.cs

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 FilterData of the matching filters to a collection.

public:
 bool GetMatchingValues(System::ServiceModel::Channels::MessageBuffer ^ messageBuffer, System::Collections::Generic::ICollection<TFilterData> ^ results);
public bool GetMatchingValues (System.ServiceModel.Channels.MessageBuffer messageBuffer, System.Collections.Generic.ICollection<TFilterData> results);
abstract member GetMatchingValues : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<'FilterData> -> bool
Public Function GetMatchingValues (messageBuffer As MessageBuffer, results As ICollection(Of TFilterData)) As Boolean

Parameters

messageBuffer
MessageBuffer

The MessageBuffer to test.

results
ICollection<TFilterData>

Reference parameter that stores the filter data of the matching filters in a generic ICollection<T><FilterData>.

Returns

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

Remarks

Use this method when one or more filters are expected to match the buffered message, only the filter data is required, and the body of the message may require inspection.

The filter data of the matching MessageFilter objects is stored in the results parameter.

Applies to