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

◆ Evaluate()

override object MS.Internal.Xml.XPath.LogicalExpr.Evaluate ( XPathNodeIterator nodeIterator)
inline

Definition at line 83 of file LogicalExpr.cs.

84 {
85 Operator.Op op = _op;
86 object obj = _opnd1.Evaluate(nodeIterator);
87 object obj2 = _opnd2.Evaluate(nodeIterator);
88 int num = (int)GetXPathType(obj);
89 int num2 = (int)GetXPathType(obj2);
90 if (num < num2)
91 {
92 op = Operator.InvertOperator(op);
93 object obj3 = obj;
94 obj = obj2;
95 obj2 = obj3;
96 int num3 = num;
97 num = num2;
98 num2 = num3;
99 }
100 cmpXslt cmpXslt = ((op != Operator.Op.EQ && op != Operator.Op.NE) ? s_CompXsltO[num][num2] : s_CompXsltE[num][num2]);
101 return cmpXslt(op, obj, obj2);
102 }
static readonly cmpXslt[][] s_CompXsltE
static readonly cmpXslt[][] s_CompXsltO
delegate bool cmpXslt(Operator.Op op, object val1, object val2)
object Evaluate(XPathNodeIterator nodeIterator)
XPathResultType GetXPathType(object value)
Definition Query.cs:147

References MS.Internal.Xml.XPath.LogicalExpr._op, MS.Internal.Xml.XPath.LogicalExpr._opnd1, MS.Internal.Xml.XPath.LogicalExpr._opnd2, MS.Internal.Xml.XPath.LogicalExpr.cmpXslt(), MS.Internal.Xml.XPath.Query.Evaluate(), MS.Internal.Xml.XPath.Query.GetXPathType(), MS.Internal.Xml.XPath.Operator.InvertOperator(), MS.Internal.Xml.XPath.LogicalExpr.s_CompXsltE, and MS.Internal.Xml.XPath.LogicalExpr.s_CompXsltO.