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

◆ toString() [3/3]

string MS.Internal.Xml.XPath.StringFunctions.toString ( XPathNodeIterator nodeIterator)
inlineprivate

Definition at line 92 of file StringFunctions.cs.

93 {
94 if (_argList.Count > 0)
95 {
96 object obj = _argList[0].Evaluate(nodeIterator);
97 switch (GetXPathType(obj))
98 {
99 case XPathResultType.NodeSet:
100 {
102 if (xPathNavigator == null)
103 {
104 return string.Empty;
105 }
106 return xPathNavigator.Value;
107 }
108 case XPathResultType.String:
109 return (string)obj;
110 case XPathResultType.Boolean:
111 if (!(bool)obj)
112 {
113 return "false";
114 }
115 return "true";
116 case (XPathResultType)4:
117 return ((XPathNavigator)obj).Value;
118 default:
119 return toString((double)obj);
120 }
121 }
122 return nodeIterator.Current.Value;
123 }
XPathResultType GetXPathType(object value)
Definition Query.cs:147
static string toString(double num)

References MS.Internal.Xml.XPath.StringFunctions._argList, System.Collections.Generic.Dictionary< TKey, TValue >.Count, MS.Internal.Xml.XPath.Query.GetXPathType(), and MS.Internal.Xml.XPath.StringFunctions.toString().