XPathMessageFilterTable<TFilterData>.GetMatchingValue 方法

定义

返回一个值,该值指示指定的文档对象是否正好满足表中的一个 XPathMessageFilter 的匹配条件,然后将匹配的筛选数据添加到集合。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.

重载

GetMatchingValue(Message, TFilterData)

返回一个值,该值指示指定的消息是否正好满足表中的一个 XPathMessageFilter 的匹配条件,然后返回匹配的筛选数据。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)

返回一个值,该值指示指定的缓冲消息是否正好满足表中的一个 XPathMessageFilter 的匹配条件,然后返回匹配的筛选数据。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)

返回一个值,该值指示 SeekableXPathNavigator 是否正好满足表中的一个 navigator 的匹配条件,然后在 out 参数中返回匹配筛选器的筛选数据。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)

返回一个值,该值指示 XPathNavigator 是否正好满足表中的一个 navigator 的匹配条件,然后在 out 参数中返回匹配筛选器的筛选数据。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.

注解

当预期有单个筛选器与文档对象相匹配,并且只需要恢复匹配筛选器的 FilterData 时,请使用这四个方法之一。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.

前两种方法是的GetMatchingValue实现。The first two methods are implementations of GetMatchingValue.

如果不需要检查正文内容,请使用 GetMatchingValueUse GetMatchingValue if the body content does not require examination. 如果可能需要检查消息正文的内容,请使用 GetMatchingValueUse GetMatchingValue if the contents of the message body may require examination.

其余的两个方法为针对于 XPathMessageFilterTable<TFilterData> 的重载。The remaining two methods are overloads specific to XPathMessageFilterTable<TFilterData>. 若要筛选通过导航器提供的文档,请使用 GetMatchingValueGetMatchingValueTo filter on a document provided through a navigator, use GetMatchingValue or GetMatchingValue.

GetMatchingValue(Message, TFilterData)

返回一个值,该值指示指定的消息是否正好满足表中的一个 XPathMessageFilter 的匹配条件,然后返回匹配的筛选数据。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

参数

message
Message

要测试的 MessageThe Message to test.

data
TFilterData

out 参数,存储与 message 匹配的筛选器的 FilterDataThe out parameter that stores the FilterData for the filter that matches the message.

返回

如果消息满足表中一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of one filter in the table is satisfied by the message; false if no filter is satisfied.

实现

异常

messagenullmessage is null.

多个筛选器与 message 相匹配。More than one filter matches the message.

注解

当预期会有单个筛选器与消息相匹配,并且只需要恢复匹配筛选器的 FilterData 时,请使用此方法。Use this method when a single filter is expected to match the message and only the FilterData from the matching filter must be recovered.

此方法实现 GetMatchingValueThis method implements GetMatchingValue.

GetMatchingValue(MessageBuffer, TFilterData)

返回一个值,该值指示指定的缓冲消息是否正好满足表中的一个 XPathMessageFilter 的匹配条件,然后返回匹配的筛选数据。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

参数

messageBuffer
MessageBuffer

要测试的 MessageBufferThe MessageBuffer to test.

data
TFilterData

out 参数,存储与 messageBuffer 匹配的筛选器的 FilterDataThe out parameter that stores the FilterData for the filter that matches the messageBuffer.

返回

如果缓冲消息满足表中一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of one filter in the table is satisfied by the buffered message; false if no filter is satisfied.

实现

异常

messagenullmessage is null.

多个筛选器与 messageBuffer 相匹配。More than one filter matches the messageBuffer.

注解

当预期有单个筛选器与缓冲消息相匹配,并且只需要恢复匹配筛选器的 FilterData 时,请使用此方法。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.

此方法实现 GetMatchingFilterThis method implements GetMatchingFilter.

GetMatchingValue(SeekableXPathNavigator, TFilterData)

返回一个值,该值指示 SeekableXPathNavigator 是否正好满足表中的一个 navigator 的匹配条件,然后在 out 参数中返回匹配筛选器的筛选数据。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

参数

data
TFilterData

out 参数,存储与 navigator 匹配的 FilterDataThe out parameter that stores the FilterData that matches the navigator.

返回

如果 navigator 正好满足表中一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of exactly one filter in the table is satisfied by the navigator; false if no filter is satisfied.

异常

navigatornullnavigator is null.

多个筛选器与 navigator 相匹配。More than one filter matches the navigator.

注解

使用此方法指定消息必须满足的 XPath 条件。Use this method to specify an XPath condition that the message must meet.

此方法类似于 GetMatchingValue,不同的是此方法使用 SeekableXPathNavigator,这样就扩展了 XPathNavigator 的功能,可以包含允许各种优化的方法。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.

GetMatchingValue(XPathNavigator, TFilterData)

返回一个值,该值指示 XPathNavigator 是否正好满足表中的一个 navigator 的匹配条件,然后在 out 参数中返回匹配筛选器的筛选数据。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

参数

navigator
XPathNavigator

要测试的 XPathNavigatorThe XPathNavigator to test.

data
TFilterData

out 参数,存储与 navigator 匹配的 FilterDataThe out parameter that stores the FilterData that matches the navigator.

返回

如果 navigator 正好满足表中一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of exactly one filter in the table is satisfied by the navigator; false if no filter is satisfied.

异常

navigatornullnavigator is null.

多个筛选器与 navigator 相匹配。More than one filter matches the navigator.

注解

使用此方法指定消息必须满足的 XPath 条件。Use this method to specify an XPath condition that the message must meet.

适用于