Bewerken

Delen via


XPathMessageFilterTable<TFilterData>.GetMatchingValue Method

Definition

Returns a value that indicates whether the match criterion of exactly one XPathMessageFilter in the table is satisfied by the specified document object 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 XPathMessageFilter in the table is satisfied by the specified message and returns the matching filter data.

GetMatchingValue(MessageBuffer, TFilterData)

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

GetMatchingValue(SeekableXPathNavigator, TFilterData)

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

GetMatchingValue(XPathNavigator, TFilterData)

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

Remarks

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

The first two methods are implementations of GetMatchingValue.

Use GetMatchingValue if the body content does not require examination. Use GetMatchingValue if the contents of the message body may require examination.

The remaining two methods are overloads specific to XPathMessageFilterTable<TFilterData>. To filter on a document provided through a navigator, use GetMatchingValue or GetMatchingValue.

GetMatchingValue(Message, TFilterData)

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

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 for the filter 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

message is null.

More than one filter matches the message.

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 GetMatchingValue.

Applies to

GetMatchingValue(MessageBuffer, TFilterData)

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

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

Parameters

messageBuffer
MessageBuffer

The MessageBuffer to test.

data
TFilterData

The out parameter that stores the FilterData for the filter that matches the messageBuffer.

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

message is null.

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.

This method implements GetMatchingFilter.

Applies to

GetMatchingValue(SeekableXPathNavigator, TFilterData)

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

public:
 bool GetMatchingValue(System::ServiceModel::Dispatcher::SeekableXPathNavigator ^ navigator, [Runtime::InteropServices::Out] TFilterData % data);
public bool GetMatchingValue (System.ServiceModel.Dispatcher.SeekableXPathNavigator navigator, out TFilterData data);
member this.GetMatchingValue : System.ServiceModel.Dispatcher.SeekableXPathNavigator * 'FilterData -> bool
Public Function GetMatchingValue (navigator As SeekableXPathNavigator, ByRef data As TFilterData) As Boolean

Parameters

data
TFilterData

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

Returns

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

Exceptions

navigator is null.

More than one filter matches the navigator.

Remarks

Use this method to specify an XPath condition that the message must meet.

This method is similar to GetMatchingValue, except that it uses a SeekableXPathNavigator, which extends the functionality of the XPathNavigator to include methods that allow various optimizations.

Applies to

GetMatchingValue(XPathNavigator, TFilterData)

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

public:
 bool GetMatchingValue(System::Xml::XPath::XPathNavigator ^ navigator, [Runtime::InteropServices::Out] TFilterData % data);
public bool GetMatchingValue (System.Xml.XPath.XPathNavigator navigator, out TFilterData data);
member this.GetMatchingValue : System.Xml.XPath.XPathNavigator * 'FilterData -> bool
Public Function GetMatchingValue (navigator As XPathNavigator, ByRef data As TFilterData) As Boolean

Parameters

navigator
XPathNavigator

The XPathNavigator to test.

data
TFilterData

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

Returns

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

Exceptions

navigator is null.

More than one filter matches the navigator.

Remarks

Use this method to specify an XPath condition that the message must meet.

Applies to