Edytuj

Udostępnij za pośrednictwem


MessageFilterTable<TFilterData>.GetMatchingFilter Method

Definition

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message or message buffer and returns that filter in an out parameter.

Overloads

GetMatchingFilter(MessageBuffer, MessageFilter)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

GetMatchingFilter(Message, MessageFilter)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

Remarks

Tests whether a message satisfies any of the filters in the filter table.

GetMatchingFilter(MessageBuffer, MessageFilter)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

public:
 virtual bool GetMatchingFilter(System::ServiceModel::Channels::MessageBuffer ^ buffer, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.ServiceModel.Channels.MessageBuffer buffer, out System.ServiceModel.Dispatcher.MessageFilter filter);
abstract member GetMatchingFilter : System.ServiceModel.Channels.MessageBuffer * MessageFilter -> bool
override this.GetMatchingFilter : System.ServiceModel.Channels.MessageBuffer * MessageFilter -> bool
Public Function GetMatchingFilter (buffer As MessageBuffer, ByRef filter As MessageFilter) As Boolean

Parameters

buffer
MessageBuffer

The MessageBuffer to test.

filter
MessageFilter

The out parameter that stores the filter that is satisfied by the buffer.

Returns

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

Implements

Exceptions

More than one ActionMessageFilter matches the messageBuffer.

Remarks

Use this method when a single filter is expected to match the message and the matching filter must be returned.

This method implements GetMatchingFilter.

Applies to

GetMatchingFilter(Message, MessageFilter)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

public:
 virtual bool GetMatchingFilter(System::ServiceModel::Channels::Message ^ message, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.ServiceModel.Channels.Message message, out System.ServiceModel.Dispatcher.MessageFilter filter);
abstract member GetMatchingFilter : System.ServiceModel.Channels.Message * MessageFilter -> bool
override this.GetMatchingFilter : System.ServiceModel.Channels.Message * MessageFilter -> bool
Public Function GetMatchingFilter (message As Message, ByRef filter As MessageFilter) As Boolean

Parameters

message
Message

The Message to test.

filter
MessageFilter

The out parameter that stores the filter that is satisfied by the message. If no filter was found, the parameter is set to its default value.

Returns

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

Implements

Exceptions

More than one ActionMessageFilter matches the messageBuffer.

Remarks

Use this method when a single filter is expected to match the message and the matching filter is required.

If the body of the message must be inspected by a filter in the filter table, use the GetMatchingFilter version of the method.

Applies to