編集

次の方法で共有


XPathMessageFilterTable<TFilterData>.GetMatchingFilter Method

Definition

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.

Overloads

GetMatchingFilter(Message, MessageFilter)

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)

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)

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)

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.

Remarks

Tests whether a message satisfies exactly one of the filters in the filter table.

GetMatchingFilter(Message, MessageFilter)

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
Public Function GetMatchingFilter (message As Message, ByRef filter As MessageFilter) As Boolean

Parameters

message
Message

The Message to test.

filter
MessageFilter

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.

Returns

The MessageFilter whose query criteria are satisfied by the message; or null if no filters are found to match.

Implements

Exceptions

message is null.

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

If more than one filter is expected to match the message, use the GetMatchingFilters.

This method implements GetMatchingFilter.

Applies to

GetMatchingFilter(MessageBuffer, MessageFilter)

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
Public Function GetMatchingFilter (messageBuffer As MessageBuffer, ByRef filter As MessageFilter) As Boolean

Parameters

messageBuffer
MessageBuffer

The MessageBuffer to test.

filter
MessageFilter

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.

Returns

The MessageFilter whose query criteria are satisfied by the buffered message; or null if no filters are found to match.

Implements

Exceptions

messageBuffer 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 the matching filter is required.

The filters in the table are allowed to inspect the message body.

If more than one filter is expected to match the message, use the GetMatchingFilters.

This method implements GetMatchingFilter.

Applies to

GetMatchingFilter(SeekableXPathNavigator, MessageFilter)

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

Parameters

filter
MessageFilter

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.

Returns

The MessageFilter whose query criteria are satisfied by the navigator; or null if no filters are found to match.

Exceptions

navigator is null.

More than one filter matches the navigator.

Remarks

Use this method when a single filter is expected to match the message specified by the SeekableXPathNavigator and the matching filter is required.

If more than one filter is expected to match the message, use the GetMatchingFilters.

Applies to

GetMatchingFilter(XPathNavigator, MessageFilter)

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

Parameters

navigator
XPathNavigator

The XPathNavigator to test.

filter
MessageFilter

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.

Returns

The MessageFilter whose query criteria are satisfied by the navigator; or null if no filters are found to match.

Exceptions

navigator is null.

More than one filter matches the navigator.

Remarks

Use this method when a single filter is expected to match the message specified by the XPathNavigator and the matching filter is required.

If more than one filter is expected to match the message, use the GetMatchingFilters.

Applies to