XQuery.Evaluate Method (DynamicContextSettings, IResultDocumentHandler)XQuery.Evaluate Method (DynamicContextSettings, IResultDocumentHandler)XQuery::Evaluate Method (DynamicContextSettings^, IResultDocumentHandler^)
Syntax
Public Function Evaluate( _ settings As DynamicContextSettings, _ resultDocumentHandler As IResultDocumentHandler _ ) As IEnumerable(Of System.Xml.XPath.XPathItem)
public IEnumerable<System.Xml.XPath.XPathItem> Evaluate( DynamicContextSettings settings, IResultDocumentHandler resultDocumentHandler )
public: IEnumerable<System.Xml.XPath::XPathItem^>^ Evaluate( DynamicContextSettings^ settings, IResultDocumentHandler^ resultDocumentHandler )
Parameters
- settings
Type: XmlPrime.DynamicContextSettingsXmlPrime.DynamicContextSettingsXmlPrime::DynamicContextSettings^
The settings of the dynamic evaluation context.
- resultDocumentHandler
Type: XmlPrime.IResultDocumentHandlerXmlPrime.IResultDocumentHandlerXmlPrime::IResultDocumentHandler^
The result document handler.
Return Value
Type: System.Collections.Generic.IEnumerable<T>System.Collections.Generic.IEnumerable(Of T)System.Collections.Generic::IEnumerable<T>^
An IEnumerable<T>IEnumerable(Of T)IEnumerable<T> representing the result of evaluating the XQuery program.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | settings or resultDocumentHandler are null
a null reference (Nothing in Visual Basic)
nullptr . |
XdmExceptionXdmExceptionXdmException | An error occurred evaluating the query. |
Remarks
The results of the query are only evaluated whilst they are enumerated. Any errors encountered during evaluation may be thrown from the MoveNextMoveNextMoveNext method and CurrentCurrentCurrent property of the enumerator over the IEnumerable<T>IEnumerable(Of T)IEnumerable<T>.
The items in the returned IEnumerable<T>IEnumerable(Of T)IEnumerable<T> will all be instances of XPathNavigatorXPathNavigatorXPathNavigator (if the expression returns a node), XPathAtomicValueXPathAtomicValueXPathAtomicValue (if the expression returns an atomic value) or XPathFunctionItemXPathFunctionItemXPathFunctionItem (if the expression returns a function item).
This method is suitable for both updating and non-updating queries.