1 using System;
 2 using System.Collections;
 3 
 4 // this file has been semiautomatically generated from 'D:/work/soulng-project/sngxml/xpath/XPathEvaluate.hpp' using cpp2cm version 1.0.0
 5 
 6 // this file has been semiautomatically generated from 'D:/work/soulng-project/sngxml/xpath/XPathEvaluate.cpp' using cpp2cm version 1.0.0
 7 
 8 namespace System.XPath
 9 {
10     public UniquePtr<XPathObject> Evaluate(const ustring& xpathExpressionSystem.Dom.Node* node)
11     {
12         System.Lex.XmlParsingLog debugLog(Console.Out());
13         TimePoint startQuery = Now();
14         XPathLexer xpathLexer(xpathExpression""0);
15         if (XPathDebugParsing())
16         {
17             xpathLexer.SetLog(&debugLog);
18         }
19         UniquePtr<XPathExpr> xpathExpr(XPathParser.Parse(xpathLexer));
20         TimePoint endQuery = Now();
21         if (XPathDebugQuery())
22         {
23             UniquePtr<System.Dom.Node> queryDom = xpathExpr->ToDom();
24             SetXPathQueryDom(Rvalue(queryDom));
25             SetXPathQueryDuration(endQuery - startQuery);
26         }
27         TimePoint startEvaluate = Now();
28         XPathContext context(node11);
29         UniquePtr<XPathObject> result = xpathExpr->Evaluate(context);
30         TimePoint endEvaluate = Now();
31         if (XPathDebugQuery())
32         {
33             SetXPathExecuteDuration(endEvaluate - startEvaluate);
34         }
35         return result;
36     }
37     public UniquePtr<XPathObject> Evaluate(const ustring& xpathExpressionSystem.Dom.Document* document)
38     {
39         return Evaluate(xpathExpressioncast<System.Dom.Node*>(document));
40     }
41 } // namespace System.XPath