XPathMessageQuery XPathMessageQuery XPathMessageQuery XPathMessageQuery Class

Definition

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
type XPathMessageQuery = class
    inherit MessageQuery
Public Class XPathMessageQuery
Inherits MessageQuery
Inheritance
XPathMessageQueryXPathMessageQueryXPathMessageQueryXPathMessageQuery
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() XPathMessageQuery() XPathMessageQuery() XPathMessageQuery()

Initializes a new instance of the XPathMessageQuery class.

XPathMessageQuery(String) XPathMessageQuery(String) XPathMessageQuery(String) XPathMessageQuery(String)

Initializes a new instance of the XPathMessageQuery class with the specified XPath expression.

XPathMessageQuery(String, XmlNamespaceManager) XPathMessageQuery(String, XmlNamespaceManager) XPathMessageQuery(String, XmlNamespaceManager) XPathMessageQuery(String, XmlNamespaceManager)

Initializes a new instance of the XPathMessageQuery class with the specified XPath expression and XmlNamespaceManager.

XPathMessageQuery(String, XsltContext) XPathMessageQuery(String, XsltContext) XPathMessageQuery(String, XsltContext) XPathMessageQuery(String, XsltContext)

Initializes a new instance of the XPathMessageQuery class with the specified XPath expression and XsltContext.

Properties

Expression Expression Expression Expression

Gets or sets the XPath expression for the XPathMessageQuery instance.

Namespaces Namespaces Namespaces Namespaces

Gets the XmlNamespaceManager associated with this XPathMessageQuery instance.

Methods

CreateMessageQueryCollection() CreateMessageQueryCollection() CreateMessageQueryCollection() CreateMessageQueryCollection()

Creates a message query collection that enables optimizations when executing multiple queries against a message.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Evaluate<TResult>(Message) Evaluate<TResult>(Message) Evaluate<TResult>(Message) Evaluate<TResult>(Message)

Evaluates the XPath query against the specified Message.

Evaluate<TResult>(MessageBuffer) Evaluate<TResult>(MessageBuffer) Evaluate<TResult>(MessageBuffer) Evaluate<TResult>(MessageBuffer)

Evaluates the XPath query against the specified MessageBuffer.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to