XPathMessageFilterTable<TFilterData>.GetMatchingFilter 方法

定义

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个筛选器的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

重载

GetMatchingFilter(Message, MessageFilter)

返回一个值,该值指示指定的消息是否正好满足表中的一个筛选器的匹配标准,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

GetMatchingFilter(MessageBuffer, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个筛选器的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

GetMatchingFilter(SeekableXPathNavigator, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个 SeekableXPathNavigator 的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one SeekableXPathNavigator in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

GetMatchingFilter(XPathNavigator, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个 XPathNavigator 的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one XPathNavigator in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

注解

测试某一消息是否正好符合筛选器表中其中一个筛选器的要求。Tests whether a message satisfies exactly one of the filters in the filter table.

GetMatchingFilter(Message, MessageFilter)

返回一个值,该值指示指定的消息是否正好满足表中的一个筛选器的匹配标准,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

public:
 virtual bool GetMatchingFilter(System::ServiceModel::Channels::Message ^ message, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.ServiceModel.Channels.Message message, out System.ServiceModel.Dispatcher.MessageFilter filter);
abstract member GetMatchingFilter : System.ServiceModel.Channels.Message * MessageFilter -> bool
override this.GetMatchingFilter : System.ServiceModel.Channels.Message * MessageFilter -> bool

参数

message
Message

要测试的 MessageThe Message to test.

filter
MessageFilter

out 参数,该参数存储 message 符合的筛选器。The out parameter that stores the filter that is satisfied by the message. 如果找不到筛选器,该参数将设置为默认值。If no filter was found, the parameter is set to its default value.

返回

消息满足其查询条件的 MessageFilter;如果未找到任何匹配的筛选器,则返回 nullThe MessageFilter whose query criteria are satisfied by the message; or null if no filters are found to match.

实现

异常

messagenullmessage is null.

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

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

注解

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

此方法对优先级最高的筛选器存储桶中的单个筛选器匹配进行测试。This method tests for a single filter match in the highest priority bucket of filters. 不允许表中的筛选器检查消息正文。The filters in the table are not allowed to inspect the message body.

如果预期会有多个筛选器与消息相匹配,请使用 GetMatchingFiltersIf more than one filter is expected to match the message, use the GetMatchingFilters.

此方法实现 GetMatchingFilterThis method implements GetMatchingFilter.

GetMatchingFilter(MessageBuffer, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个筛选器的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

public:
 virtual bool GetMatchingFilter(System::ServiceModel::Channels::MessageBuffer ^ messageBuffer, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.ServiceModel.Channels.MessageBuffer messageBuffer, out System.ServiceModel.Dispatcher.MessageFilter filter);
abstract member GetMatchingFilter : System.ServiceModel.Channels.MessageBuffer * MessageFilter -> bool
override this.GetMatchingFilter : System.ServiceModel.Channels.MessageBuffer * MessageFilter -> bool

参数

messageBuffer
MessageBuffer

要测试的 MessageBufferThe MessageBuffer to test.

filter
MessageFilter

out 参数,该参数存储 message 符合的筛选器。The out parameter that stores the filter that is satisfied by the message. 如果找不到筛选器,该参数将设置为默认值。If no filter was found, the parameter is set to its default value.

返回

缓冲消息满足其查询条件的 MessageFilter;如果未找到任何匹配的筛选器,则返回 nullThe MessageFilter whose query criteria are satisfied by the buffered message; or null if no filters are found to match.

实现

异常

messageBuffernullmessageBuffer is null.

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

注解

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

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

如果预期会有多个筛选器与消息相匹配,请使用 GetMatchingFiltersIf more than one filter is expected to match the message, use the GetMatchingFilters.

此方法实现 GetMatchingFilterThis method implements GetMatchingFilter.

GetMatchingFilter(SeekableXPathNavigator, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个 SeekableXPathNavigator 的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one SeekableXPathNavigator in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

public:
 bool GetMatchingFilter(System::ServiceModel::Dispatcher::SeekableXPathNavigator ^ navigator, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.ServiceModel.Dispatcher.SeekableXPathNavigator navigator, out System.ServiceModel.Dispatcher.MessageFilter filter);
member this.GetMatchingFilter : System.ServiceModel.Dispatcher.SeekableXPathNavigator * MessageFilter -> bool
Public Function GetMatchingFilter (navigator As SeekableXPathNavigator, ByRef filter As MessageFilter) As Boolean

参数

filter
MessageFilter

out 参数,该参数存储 message 符合的筛选器。The out parameter that stores the filter that is satisfied by the message. 如果找不到筛选器,该参数将设置为默认值。If no filter was found, the parameter is set to its default value.

返回

缓冲消息满足其查询条件的 MessageFilter;如果未找到任何匹配的筛选器,则返回 nullThe MessageFilter whose query criteria are satisfied by the navigator; or null if no filters are found to match.

异常

navigatornullnavigator is null.

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

注解

当预期会有单个筛选器与 SeekableXPathNavigator 指定的消息相匹配,并且需要匹配筛选器时,请使用此方法。Use this method when a single filter is expected to match the message specified by the SeekableXPathNavigator and the matching filter is required.

如果预期会有多个筛选器与消息相匹配,请使用 GetMatchingFiltersIf more than one filter is expected to match the message, use the GetMatchingFilters.

GetMatchingFilter(XPathNavigator, MessageFilter)

返回一个值,该值指示指定的消息或缓冲消息是否正好满足表中的一个 XPathNavigator 的匹配条件,然后在 out 参数中返回该筛选器。Returns a value that indicates whether the match criterion of exactly one XPathNavigator in the table is satisfied by the specified message or buffered message and returns that filter in an out parameter.

public:
 bool GetMatchingFilter(System::Xml::XPath::XPathNavigator ^ navigator, [Runtime::InteropServices::Out] System::ServiceModel::Dispatcher::MessageFilter ^ % filter);
public bool GetMatchingFilter (System.Xml.XPath.XPathNavigator navigator, out System.ServiceModel.Dispatcher.MessageFilter filter);
member this.GetMatchingFilter : System.Xml.XPath.XPathNavigator * MessageFilter -> bool
Public Function GetMatchingFilter (navigator As XPathNavigator, ByRef filter As MessageFilter) As Boolean

参数

navigator
XPathNavigator

要测试的 XPathNavigatorThe XPathNavigator to test.

filter
MessageFilter

out 参数,该参数存储 navigator 符合的筛选器。The out parameter that stores the filter that is satisfied by the navigator. 如果找不到筛选器,该参数将设置为默认值。If no filter was found, the parameter is set to its default value.

返回

缓冲消息满足其查询条件的 MessageFilter;如果未找到任何匹配的筛选器,则返回 nullThe MessageFilter whose query criteria are satisfied by the navigator; or null if no filters are found to match.

异常

navigatornullnavigator is null.

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

注解

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

如果预期会有多个筛选器与消息相匹配,请使用 GetMatchingFiltersIf more than one filter is expected to match the message, use the GetMatchingFilters.

适用于