XPathMessageQuery XPathMessageQuery XPathMessageQuery XPathMessageQuery Class

定義

評估 XPath 運算式以從訊息擷取資料的訊息查詢。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
繼承
XPathMessageQueryXPathMessageQueryXPathMessageQueryXPathMessageQuery
屬性

範例

下列範例將示範如何建立 QueryCorrelationInitializer 並且使用 MessageQuerySet 來指定 XPathMessageQueryThe 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) }
            }
        }
    }                        
}, 

建構函式

XPathMessageQuery() XPathMessageQuery() XPathMessageQuery() XPathMessageQuery()

初始化 XPathMessageQuery 類別的新執行個體。Initializes a new instance of the XPathMessageQuery class.

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

使用指定的 XPath 運算式,初始化 XPathMessageQuery 類別的新執行個體。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)

使用指定的 XPath 運算式與 XPathMessageQuery,初始化 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)

使用指定的 XPath 運算式與 XPathMessageQuery,初始化 XsltContext 類別的新執行個體。Initializes a new instance of the XPathMessageQuery class with the specified XPath expression and XsltContext.

屬性

Expression Expression Expression Expression

取得或設定 XPathMessageQuery 執行個體的 XPath 運算式。Gets or sets the XPath expression for the XPathMessageQuery instance.

Namespaces Namespaces Namespaces Namespaces

取得與這個 XmlNamespaceManager 執行個體相關聯的 XPathMessageQueryGets the XmlNamespaceManager associated with this XPathMessageQuery instance.

方法

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)

針對指定的 Message 評估 XPath 查詢。Evaluates the XPath query against the specified Message.

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

針對指定的 MessageBuffer 評估 XPath 查詢。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()

取得目前執行個體的 TypeGets the Type of the current instance.

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

建立目前 Object 的淺層複本 (Shallow Copy)。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)

適用於