ActionMessageFilter.Match ActionMessageFilter.Match ActionMessageFilter.Match ActionMessageFilter.Match Method

Definition

Tests whether a message or a buffered message matches one of the actions configured for the filter.

Overloads

Match(Message) Match(Message) Match(Message)

Tests whether a message's action matches one of the actions specified in this ActionMessageFilter.

Match(MessageBuffer) Match(MessageBuffer) Match(MessageBuffer) Match(MessageBuffer)

Tests whether a buffered message's action header matches one of the actions specified in this ActionMessageFilter.

Remarks

The difference between the two overloads is that one takes a Message parameter and cannot examine the message body; the other takes a MessageBuffer parameter and can examine any part of the message. Because an action filter does not examine the body, these methods are equivalent.

If you must check the message against multiple ActionMessageFilter objects, put the filters into an IMessageFilterTable<TFilterData> and then use the matching functionality provided by the table.

Match(Message) Match(Message) Match(Message)

Tests whether a message's action matches one of the actions specified in this ActionMessageFilter.

public:
 override bool Match(System::ServiceModel::Channels::Message ^ message);
public override bool Match (System.ServiceModel.Channels.Message message);
override this.Match : System.ServiceModel.Channels.Message -> bool

Parameters

message
Message Message Message Message

The Message to test.

Returns

true if the Message action header matches one of the specified actions; otherwise, false.

Exceptions

Remarks

Use this overload of Match when a message must be tested against the actions in a single filter and the Message is available.

Match(MessageBuffer) Match(MessageBuffer) Match(MessageBuffer) Match(MessageBuffer)

Tests whether a buffered message's action header matches one of the actions specified in this ActionMessageFilter.

public:
 override bool Match(System::ServiceModel::Channels::MessageBuffer ^ buffer);
public override bool Match (System.ServiceModel.Channels.MessageBuffer buffer);
override this.Match : System.ServiceModel.Channels.MessageBuffer -> bool
Public Overrides Function Match (buffer As MessageBuffer) As Boolean

Parameters

Returns

true if the MessageBuffer action header matches one of the specified actions; otherwise, false.

Exceptions

Remarks

Use this overload of the Match method when a message must be tested against the actions in a single filter and the MessageBuffer is available.

Applies to