XPathMessageFilterTable<TFilterData>.GetMatchingFilters 方法

定义

返回一个值,该值指示指定的 XML 文档是否满足表中筛选器的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of a filter in the table is satisfied by the specified XML document and adds the matching filters to a collection.

重载

GetMatchingFilters(SeekableXPathNavigator, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 SeekableXPathNavigator 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one SeekableXPathNavigator in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

GetMatchingFilters(XPathNavigator, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 XPathNavigator 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathNavigator in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

GetMatchingFilters(Message, ICollection<MessageFilter>)

返回一个值,该值指示指定的消息是否满足表中至少一个 XPathMessageFilter 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathMessageFilter in the table is satisfied by the specified message and adds the matching filters to a collection.

GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 XPathMessageFilter 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathMessageFilter in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

注解

当预期有多个筛选器与消息匹配,并且需要匹配筛选器时,请使用此方法。Use this method when more than one filter is expected to match the message and the matching filters are required.

GetMatchingFilters(SeekableXPathNavigator, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 SeekableXPathNavigator 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one SeekableXPathNavigator in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

public:
 bool GetMatchingFilters(System::ServiceModel::Dispatcher::SeekableXPathNavigator ^ navigator, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.ServiceModel.Dispatcher.SeekableXPathNavigator navigator, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
member this.GetMatchingFilters : System.ServiceModel.Dispatcher.SeekableXPathNavigator * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
Public Function GetMatchingFilters (navigator As SeekableXPathNavigator, results As ICollection(Of MessageFilter)) As Boolean

参数

results
ICollection<MessageFilter>

存储 ICollection<T><Filter> 中匹配的 MessageFilter 对象的引用参数。The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

返回

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

异常

navigatorresultsnullnavigator or results is null.

注解

当预期会有多个筛选器与导航器匹配,并且需要匹配筛选器时,请使用此方法。Use this method when more than one filter is expected to match the navigator and the matching filters are required.

如果预期只有一个筛选器与消息相匹配,请使用 GetMatchingFilter 方法。If only one filter is expected to match the message, use the GetMatchingFilter method.

GetMatchingFilters(XPathNavigator, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 XPathNavigator 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathNavigator in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

public:
 bool GetMatchingFilters(System::Xml::XPath::XPathNavigator ^ navigator, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.Xml.XPath.XPathNavigator navigator, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
member this.GetMatchingFilters : System.Xml.XPath.XPathNavigator * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
Public Function GetMatchingFilters (navigator As XPathNavigator, results As ICollection(Of MessageFilter)) As Boolean

参数

navigator
XPathNavigator

要测试的 XPathNavigatorThe XPathNavigator to test.

results
ICollection<MessageFilter>

存储 ICollection<T><Filter> 中匹配的 MessageFilter 对象的引用参数。The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

返回

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

异常

navigatorresultsnullnavigator or results is null.

注解

当预期会有多个筛选器与 XPathNavigator 指定的消息相匹配,并且需要匹配筛选器时,请使用此方法。Use this method when multiple filters can be expected to match the message specified by the XPathNavigator and the matching filters are required.

如果预期只有一个筛选器与消息相匹配,请使用 GetMatchingFilter 方法。If only one filter is expected to match the message, use the GetMatchingFilter method.

GetMatchingFilters(Message, ICollection<MessageFilter>)

返回一个值,该值指示指定的消息是否满足表中至少一个 XPathMessageFilter 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathMessageFilter in the table is satisfied by the specified message and adds the matching filters to a collection.

public:
 virtual bool GetMatchingFilters(System::ServiceModel::Channels::Message ^ message, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.ServiceModel.Channels.Message message, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
abstract member GetMatchingFilters : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
override this.GetMatchingFilters : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool

参数

message
Message

要测试的 MessageThe Message to test.

results
ICollection<MessageFilter>

存储 ICollection<T><Filter> 中匹配的 MessageFilter 对象的引用参数。The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

返回

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

实现

异常

messageresultsnullmessage or results is null.

筛选器试图检查消息正文的内容。A filter attempted to examine the contents of the message body.

注解

当预期有多个筛选器与消息匹配,并且需要匹配筛选器时,请使用此方法。Use this method when more than one filter is expected to match the message and the matching filters are required.

不允许表中的筛选器检查消息正文。The filters in the table are not allowed to inspect the message body.

匹配的 XPathMessageFilter 对象存储在 resultsICollection<T> 参数中。The matching XPathMessageFilter objects are stored in the results parameter of ICollection<T>. 然后,可以使用这些筛选器作为键,通过 FilterData 提供的方法从筛选器表恢复 IDictionary<TKey,TValue>The FilterData can then be recovered from the filter table using these filters as keys with the methods provided by IDictionary<TKey,TValue>.

此方法实现 GetMatchingFiltersThis method implements GetMatchingFilters.

GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个 XPathMessageFilter 的匹配条件,然后将匹配筛选器添加到集合。Returns a value that indicates whether the match criterion of at least one XPathMessageFilter in the table is satisfied by the specified buffered message and adds the matching filters to a collection.

public:
 virtual bool GetMatchingFilters(System::ServiceModel::Channels::MessageBuffer ^ messageBuffer, System::Collections::Generic::ICollection<System::ServiceModel::Dispatcher::MessageFilter ^> ^ results);
public bool GetMatchingFilters (System.ServiceModel.Channels.MessageBuffer messageBuffer, System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> results);
abstract member GetMatchingFilters : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool
override this.GetMatchingFilters : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<System.ServiceModel.Dispatcher.MessageFilter> -> bool

参数

messageBuffer
MessageBuffer

要测试的 MessageBufferThe MessageBuffer to test.

results
ICollection<MessageFilter>

存储 ICollection<T><Filter> 中匹配的 MessageFilter 对象的引用参数。The reference parameter that stores the MessageFilter objects that match in ICollection<T><Filter>.

返回

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

实现

异常

messageBufferresultsnullmessageBuffer or results is null.

注解

当预期有多个筛选器与缓冲消息相匹配,并且需要匹配筛选器时,请使用此方法。Use this method when more than one filter is expected to match the buffered message and the matching filters are required.

允许表中的筛选器检查消息正文。The filters in the table are allowed to inspect the message body.

匹配的 MessageFilter 对象存储在 resultsICollection<T> 参数中。The matching MessageFilter objects are stored in the results parameter of ICollection<T>. 然后,可以使用这些筛选器作为键,通过 FilterData 提供的方法从筛选器表恢复 IDictionary<TKey,TValue>The FilterData can then be recovered from the filter table using these filters as keys with the methods provided by IDictionary<TKey,TValue>.

此方法实现 GetMatchingFiltersThis method implements GetMatchingFilters.

适用于