IMessageFilterTable<TFilterData>.GetMatchingFilter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a filter from the table whose query criteria are satisfied by a specified message or buffered message.
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 |
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 |
Remarks
Use this method when a single filter is expected to match the message and the matching filter is required.
Use GetMatchingFilter if the body content does not require examination. Use GetMatchingFilter if the contents of the message body may require examination.
GetMatchingFilter(Message, MessageFilter)
- Source:
- IMessageFilterTable.cs
- Source:
- IMessageFilterTable.cs
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:
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
Public Function GetMatchingFilter (message As Message, ByRef filter As MessageFilter) As Boolean
Parameters
- filter
- MessageFilter
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
true
if the match criterion of at least one filter in the table is satisfied by message
; false
if no filter is satisfied.
Remarks
Use this method when a single filter is expected to match the message and the matching filter is required.
If the body of the message must be inspected by a filter in the filter table, use the GetMatchingFilter version of the method.
Notes to Implementers
If more than one filter matches the message, a MultipleFilterMatchesException must be thrown.
This version takes a Message and must throw an InvalidBodyAccessException if it tries to examine the message body.
Applies to
GetMatchingFilter(MessageBuffer, MessageFilter)
- Source:
- IMessageFilterTable.cs
- Source:
- IMessageFilterTable.cs
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:
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
Public Function GetMatchingFilter (messageBuffer As MessageBuffer, ByRef filter As MessageFilter) As Boolean
Parameters
- messageBuffer
- MessageBuffer
The MessageBuffer to test.
- filter
- MessageFilter
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
true
if the match criterion of at least one filter in the table is satisfied by messageBuffer
; false
if no filter is satisfied.
Remarks
Use this method when a single filter is expected to match the buffered message, the matching filter must be returned, and the body of the message may have to be inspected.