XPathMessageQuery Class
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.
A message query that evaluates XPath expressions to retrieve data from a message.
public ref class XPathMessageQuery : System::ServiceModel::Dispatcher::MessageQuery
[System.Windows.Markup.ContentProperty("Expression")]
public class XPathMessageQuery : System.ServiceModel.Dispatcher.MessageQuery
[<System.Windows.Markup.ContentProperty("Expression")>]
type XPathMessageQuery = class
inherit MessageQuery
Public Class XPathMessageQuery
Inherits MessageQuery
- Inheritance
- Attributes
Examples
The following example shows how to create a QueryCorrelationInitializer and specify a MessageQuerySet using a XPathMessageQuery.
new SendReply
{
Request = submitPO,
Content = SendContent.Create(new InArgument<int>( (e) => po.Get(e).Id)), // creates a SendMessageContent
CorrelationInitializers =
{
new QueryCorrelationInitializer
{
// initializes a correlation based on the PurchaseOrder Id sent in the reply message and stores it in the handle
CorrelationHandle = poidHandle,
MessageQuerySet = new MessageQuerySet
{
// int is the name of the parameter being sent in the outgoing response
{ "PoId", new XPathMessageQuery("sm:body()/ser:int", Constants.XPathMessageContext) }
}
}
}
},
Constructors
XPathMessageQuery() |
Initializes a new instance of the XPathMessageQuery class. |
XPathMessageQuery(String) |
Initializes a new instance of the XPathMessageQuery class with the specified XPath expression. |
XPathMessageQuery(String, XmlNamespaceManager) |
Initializes a new instance of the XPathMessageQuery class with the specified XPath expression and XmlNamespaceManager. |
XPathMessageQuery(String, XsltContext) |
Initializes a new instance of the XPathMessageQuery class with the specified XPath expression and XsltContext. |
Properties
Expression |
Gets or sets the XPath expression for the XPathMessageQuery instance. |
Namespaces |
Gets the XmlNamespaceManager associated with this XPathMessageQuery instance. |
Methods
CreateMessageQueryCollection() |
Creates a message query collection that enables optimizations when executing multiple queries against a message. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Evaluate<TResult>(Message) |
Evaluates the XPath query against the specified Message. |
Evaluate<TResult>(MessageBuffer) |
Evaluates the XPath query against the specified MessageBuffer. |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Applies to
.NET