MessageQuery.Evaluate Method

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

When overridden in a derived class, runs a query against the message and returns a value that satisfies the query.

Namespace:   System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

NameDescription
System_CAPS_pubmethodEvaluate<TResult>(Message)

When overridden in a derived class, runs a query against the message and returns a result. The body cannot be queried.

System_CAPS_pubmethodEvaluate<TResult>(MessageBuffer)

When overridden in a derived class, runs a query against the message and returns a result.

The difference between the two overloads is that one takes a Message parameter and is not permitted to examine the body; the other takes a MessageBuffer parameter and can examine any part of the message. Message headers are automatically buffered and can be queried without being consumed. However, if the body is to be queried, then the entire message must be buffered because an unbuffered message body can be consumed by the query.

Return to top
Show: