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

◆ toBoolean() [3/3]

bool MS.Internal.Xml.XPath.BooleanFunctions.toBoolean ( XPathNodeIterator nodeIterator)
inlinepackage

Definition at line 63 of file BooleanFunctions.cs.

64 {
65 object obj = _arg.Evaluate(nodeIterator);
67 {
68 return _arg.Advance() != null;
69 }
70 if (obj is string str)
71 {
72 return toBoolean(str);
73 }
74 if (obj is double)
75 {
76 return toBoolean((double)obj);
77 }
78 if (obj is bool)
79 {
80 return (bool)obj;
81 }
82 return true;
83 }
static bool toBoolean(double number)
object Evaluate(XPathNodeIterator nodeIterator)
XPathNavigator Advance()

References MS.Internal.Xml.XPath.BooleanFunctions._arg, MS.Internal.Xml.XPath.Query.Advance(), MS.Internal.Xml.XPath.Query.Evaluate(), System.obj, System.str, and MS.Internal.Xml.XPath.BooleanFunctions.toBoolean().