Uredi

Deli z drugimi prek


MessageFilterTable<TFilterData>.GetMatchingValue Method

Definition

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

Overloads

GetMatchingValue(Message, TFilterData)

Returns a value that indicates whether the match criterion of exactly one MessageFilter in the table is satisfied by the specified message and adds the matching filter data to a collection.

GetMatchingValue(MessageBuffer, TFilterData)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified buffered message and adds the matching filter data to a collection.

Remarks

Use one of these methods when a single filter is expected to match the message and only the FilterData from the matching filter must be recovered.

Use GetMatchingValue to inspect message headers and GetMatchingValue to inspect a buffered message, which can include looking at the message body.

GetMatchingValue(Message, TFilterData)

Returns a value that indicates whether the match criterion of exactly one MessageFilter in the table is satisfied by the specified message and adds the matching filter data to a collection.

public:
 virtual bool GetMatchingValue(System::ServiceModel::Channels::Message ^ message, [Runtime::InteropServices::Out] TFilterData % data);
public bool GetMatchingValue (System.ServiceModel.Channels.Message message, out TFilterData data);
abstract member GetMatchingValue : System.ServiceModel.Channels.Message * 'FilterData -> bool
override this.GetMatchingValue : System.ServiceModel.Channels.Message * 'FilterData -> bool
Public Function GetMatchingValue (message As Message, ByRef data As TFilterData) As Boolean

Parameters

message
Message

The Message to test.

data
TFilterData

The out parameter that stores the FilterData that matches the message.

Returns

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

Implements

Exceptions

More than one filter matches the message.

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

Remarks

Use this method when a single filter is expected to match the message and only the FilterData from the matching filter must be recovered.

This method implements GetMatchingFilter.

Applies to

GetMatchingValue(MessageBuffer, TFilterData)

Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified buffered message and adds the matching filter data to a collection.

public:
 virtual bool GetMatchingValue(System::ServiceModel::Channels::MessageBuffer ^ buffer, [Runtime::InteropServices::Out] TFilterData % data);
public bool GetMatchingValue (System.ServiceModel.Channels.MessageBuffer buffer, out TFilterData data);
abstract member GetMatchingValue : System.ServiceModel.Channels.MessageBuffer * 'FilterData -> bool
override this.GetMatchingValue : System.ServiceModel.Channels.MessageBuffer * 'FilterData -> bool
Public Function GetMatchingValue (buffer As MessageBuffer, ByRef data As TFilterData) As Boolean

Parameters

buffer
MessageBuffer

The MessageBuffer to test.

data
TFilterData

The out parameter that stores the FilterData that matches the buffer.

Returns

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

Implements

Exceptions

More than one filter matches the messageBuffer.

Remarks

Use this method when a single filter is expected to match the buffered message and only the FilterData from the matching filter must be recovered. Because the filter is being matched to a buffered message, it can specify conditions on the message body.

This method implements GetMatchingFilter.

Applies to