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

◆ CompareNodeSetAndValue()

static bool System.Xml.Xsl.Runtime.XsltLibrary.CompareNodeSetAndValue ( ComparisonOperator op,
IList< XPathNavigator > nodeset,
XPathItem val,
TypeCode compType )
inlinestaticprivate

Definition at line 282 of file XsltLibrary.cs.

283 {
284 if (compType == TypeCode.Boolean)
285 {
286 return CompareNumbers(op, (nodeset.Count != 0) ? 1 : 0, XsltConvert.ToBoolean(val) ? 1 : 0);
287 }
288 int count = nodeset.Count;
289 for (int i = 0; i < count; i++)
290 {
291 if (CompareValues(op, nodeset[i], val, compType))
292 {
293 return true;
294 }
295 }
296 return false;
297 }
static bool CompareNumbers(ComparisonOperator op, double left, double right)
static bool CompareValues(ComparisonOperator op, XPathItem left, XPathItem right, TypeCode compType)

References System.Xml.Xsl.Runtime.XsltLibrary.CompareNumbers(), System.Xml.Xsl.Runtime.XsltLibrary.CompareValues(), System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, and System.Xml.Xsl.Runtime.XsltConvert.ToBoolean().

Referenced by System.Xml.Xsl.Runtime.XsltLibrary.EqualityOperator(), and System.Xml.Xsl.Runtime.XsltLibrary.RelationalOperator().