XPathMessageFilter XPathMessageFilter XPathMessageFilter XPathMessageFilter Constructors

Definition

Overloads

XPathMessageFilter() XPathMessageFilter() XPathMessageFilter()

Initializes a new instance of the XPathMessageFilter class that matches all well-formed XML documents.

XPathMessageFilter(String) XPathMessageFilter(String) XPathMessageFilter(String) XPathMessageFilter(String)

Initializes a new instance of the XPathMessageFilter class using an XPath expression to specify query criteria for the filter.

XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with the specified XML reader.

XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class using the specified XPath expression and namespace manager.

XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class by reading in a streamed XPath with a specified XML reader and using the specified namespace manager.

XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext)

Initializes a new instance of the XPathMessageFilter class using a specified XPath expression and XsltContext.

XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with a specified XML reader and using the XsltContext to resolve namespaces, custom functions, and variables.

XPathMessageFilter() XPathMessageFilter() XPathMessageFilter()

Initializes a new instance of the XPathMessageFilter class that matches all well-formed XML documents.

public:
 XPathMessageFilter();
public XPathMessageFilter ();
Public Sub New ()

Remarks

Initializes a new instance of the XPathMessageFilter class with an empty XPath expression. An empty XPath expression always matches a well-formed XML document, so all objects satisfy the criteria of a filter defined by an empty XPath expression.

XPathMessageFilter(String) XPathMessageFilter(String) XPathMessageFilter(String) XPathMessageFilter(String)

Initializes a new instance of the XPathMessageFilter class using an XPath expression to specify query criteria for the filter.

public:
 XPathMessageFilter(System::String ^ xpath);
public XPathMessageFilter (string xpath);
new System.ServiceModel.Dispatcher.XPathMessageFilter : string -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (xpath As String)

Parameters

xpath
String String String String

A String that contains an XPath 1.0 expression.

Exceptions

Remarks

Use this constructor when there are no namespaces to manage.

This constructor initializes the XmlNamespaceManager assigned to the Namespaces property by using the default XPathMessageContext, so the XPath expression has access to the function library that the XPathMessageContext defines.

XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader) XPathMessageFilter(XmlReader)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with the specified XML reader.

public:
 XPathMessageFilter(System::Xml::XmlReader ^ reader);
public XPathMessageFilter (System.Xml.XmlReader reader);
new System.ServiceModel.Dispatcher.XPathMessageFilter : System.Xml.XmlReader -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (reader As XmlReader)

Parameters

reader
XmlReader XmlReader XmlReader XmlReader

The XmlReader to read the streamed XPath expression.

Exceptions

Remarks

It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter. The constructor also automatically initializes the namespace manager by resolving all prefixes in the XPath expression as they were bound in the reader.

This method can access any XML that can be created by the WriteXPathTo method.

XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager) XPathMessageFilter(String, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class using the specified XPath expression and namespace manager.

public:
 XPathMessageFilter(System::String ^ xpath, System::Xml::XmlNamespaceManager ^ namespaces);
public XPathMessageFilter (string xpath, System.Xml.XmlNamespaceManager namespaces);
new System.ServiceModel.Dispatcher.XPathMessageFilter : string * System.Xml.XmlNamespaceManager -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (xpath As String, namespaces As XmlNamespaceManager)

Parameters

xpath
String String String String

An XPath 1.0 expression.

namespaces
XmlNamespaceManager XmlNamespaceManager XmlNamespaceManager XmlNamespaceManager

An XmlNamespaceManager that resolves any namespace prefixes in xpath.

Exceptions

Remarks

Use this constructor when XPath uses prefixes not defined in XPathMessageContext, or when you want to use your own XmlNamespaceManager. An instance of XPathMessageContext can be created and passed to this method.

If the instances provided to this method are XsltContext implementations, it is equivalent to calling the XPathMessageFilter constructor.

XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager) XPathMessageFilter(XmlReader, XmlNamespaceManager)

Initializes a new instance of the XPathMessageFilter class by reading in a streamed XPath with a specified XML reader and using the specified namespace manager.

public:
 XPathMessageFilter(System::Xml::XmlReader ^ reader, System::Xml::XmlNamespaceManager ^ namespaces);
public XPathMessageFilter (System.Xml.XmlReader reader, System.Xml.XmlNamespaceManager namespaces);
new System.ServiceModel.Dispatcher.XPathMessageFilter : System.Xml.XmlReader * System.Xml.XmlNamespaceManager -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (reader As XmlReader, namespaces As XmlNamespaceManager)

Parameters

reader
XmlReader XmlReader XmlReader XmlReader

The XmlReader to read the streamed XPath expression.

namespaces
XmlNamespaceManager XmlNamespaceManager XmlNamespaceManager XmlNamespaceManager

An XmlNamespaceManager that resolves any namespace prefixes in the XPath expression from reader. This can also be an XsltContext that defines custom functions or variables.

Exceptions

reader is not positioned on the starting element.

There were problems reading the dialect attribute or namespace URI, or duplicate attributes were found.

-or-

An invalid dialect attribute was read: it was not XPath.

Remarks

Use this constructor when you want to use your own XmlReader and XmlNamespaceManager to define the filter.

It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter.

XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext) XPathMessageFilter(String, XsltContext)

Initializes a new instance of the XPathMessageFilter class using a specified XPath expression and XsltContext.

public:
 XPathMessageFilter(System::String ^ xpath, System::Xml::Xsl::XsltContext ^ namespaces);
public XPathMessageFilter (string xpath, System.Xml.Xsl.XsltContext namespaces);
new System.ServiceModel.Dispatcher.XPathMessageFilter : string * System.Xml.Xsl.XsltContext -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (xpath As String, namespaces As XsltContext)

Parameters

xpath
String String String String

The XPath 1.0 expression for the filter.

context
XsltContext XsltContext XsltContext XsltContext

An XsltContext that resolves any namespace prefixes, custom functions or variables in xpath.

XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext) XPathMessageFilter(XmlReader, XsltContext)

Initializes a new instance of the XPathMessageFilter class by reading a streamed XPath with a specified XML reader and using the XsltContext to resolve namespaces, custom functions, and variables.

public:
 XPathMessageFilter(System::Xml::XmlReader ^ reader, System::Xml::Xsl::XsltContext ^ namespaces);
public XPathMessageFilter (System.Xml.XmlReader reader, System.Xml.Xsl.XsltContext namespaces);
new System.ServiceModel.Dispatcher.XPathMessageFilter : System.Xml.XmlReader * System.Xml.Xsl.XsltContext -> System.ServiceModel.Dispatcher.XPathMessageFilter
Public Sub New (reader As XmlReader, namespaces As XsltContext)

Parameters

reader
XmlReader XmlReader XmlReader XmlReader

The XmlReader to read the streamed XPath expression.

context
XsltContext XsltContext XsltContext XsltContext

An XsltContext that resolves any namespace prefixes, functions, and variables in the XPath expression from reader.

Exceptions

Remarks

Use this constructor when you want to use your own XmlReader and XmlNamespaceManager to define the filter.

It is assumed that the reader is positioned at the start element of the serialized XPathMessageFilter. The name of the element is not validated before reading. When this method returns, the reader is positioned immediately after the serialized XPathMessageFilter.

Applies to