Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Evaluate()

override object MS.Internal.Xml.XPath.IDQuery.Evaluate ( XPathNodeIterator context)
inline

Definition at line 18 of file IDQuery.cs.

19 {
20 object obj = base.Evaluate(context);
21 XPathNavigator contextNode = context.Current.Clone();
22 switch (GetXPathType(obj))
23 {
24 case XPathResultType.NodeSet:
25 {
27 while ((xPathNavigator = input.Advance()) != null)
28 {
29 ProcessIds(contextNode, xPathNavigator.Value);
30 }
31 break;
32 }
33 case XPathResultType.String:
34 ProcessIds(contextNode, (string)obj);
35 break;
36 case XPathResultType.Number:
37 ProcessIds(contextNode, StringFunctions.toString((double)obj));
38 break;
39 case XPathResultType.Boolean:
40 ProcessIds(contextNode, StringFunctions.toString((bool)obj));
41 break;
42 case (XPathResultType)4:
43 ProcessIds(contextNode, ((XPathNavigator)obj).Value);
44 break;
45 }
46 return this;
47 }
void ProcessIds(XPathNavigator contextNode, string val)
Definition IDQuery.cs:49
XPathResultType GetXPathType(object value)
Definition Query.cs:147
XPathNavigator Advance()

References MS.Internal.Xml.XPath.Query.Advance(), System.Xml.XPath.XPathNavigator.Clone(), System.Xml.XPath.XPathNodeIterator.Current, System.Xml.Dictionary, MS.Internal.Xml.XPath.Query.GetXPathType(), MS.Internal.Xml.XPath.CacheOutputQuery.input, MS.Internal.Xml.XPath.IDQuery.ProcessIds(), MS.Internal.Xml.XPath.StringFunctions.toString(), and System.Xml.XPath.XPathItem.Value.

Referenced by MS.Internal.Xml.XPath.IDQuery.MatchNode().