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

◆ CompileSort()

void System.Xml.Xsl.Xslt.QilGenerator.CompileSort ( Sort sort,
QilList keyList,
ref LoopFocus parentLoop )
inlineprivate

Definition at line 1405 of file QilGenerator.cs.

1406 {
1408 bool forwardsCompatible = sort.ForwardsCompatible;
1409 QilNode select = CompileXPathExpression(sort.Select);
1410 QilNode value;
1414 if (sort.Lang != null || sort.DataType != null || sort.Order != null || sort.CaseOrder != null)
1415 {
1416 LoopFocus curLoop = _curLoop;
1420 qilNode = CompileOrderAttribute("order", sort.Order, "ascending", "descending", forwardsCompatible);
1421 qilNode2 = CompileOrderAttribute("case-order", sort.CaseOrder, "lower-first", "upper-first", forwardsCompatible);
1422 _curLoop = curLoop;
1423 }
1424 else
1425 {
1426 select = _f.ConvertToString(select);
1427 select2 = (value = (qilNode = (qilNode2 = null)));
1428 }
1429 _strConcat.Reset();
1430 _strConcat.Append("http://collations.microsoft.com");
1431 _strConcat.Append('/');
1433 char value2 = '?';
1434 if (qilNode != null)
1435 {
1437 _strConcat.Append("descendingOrder=");
1439 value2 = '&';
1440 }
1441 if (qilNode2 != null)
1442 {
1444 _strConcat.Append("upperFirst=");
1446 value2 = '&';
1447 }
1449 QilSortKey node = _f.SortKey(select, qilNode3);
1450 keyList.Add(node);
1451 if (select2 != null)
1452 {
1453 node = _f.SortKey(select2, qilNode3.DeepClone(_f.BaseFactory));
1454 keyList.Add(node);
1455 }
1456 ExitScope();
1457 }
virtual void Add(QilNode node)
Definition QilNode.cs:121
QilSortKey SortKey(QilNode key, QilNode collation)
QilNode CompileXPathExpression(string expr)
readonly XsltQilFactory _f
QilNode CompileLangAttribute(string attValue, bool fwdCompat)
QilNode CompileOrderAttribute(string attName, string attValue, string value0, string value1, bool fwdCompat)
void CompileDataTypeAttribute(string attValue, bool fwdCompat, ref QilNode select, out QilNode select2)
QilList EnterScope(XslNode node)
readonly QilStrConcatenator _strConcat

References System.Xml.Xsl.Xslt.QilGenerator._curLoop, System.Xml.Xsl.Xslt.QilGenerator._f, System.Xml.Xsl.Xslt.QilGenerator._strConcat, System.Xml.Xsl.Qil.QilNode.Add(), System.Xml.Xsl.Xslt.QilStrConcatenator.Append(), System.Xml.Xsl.Qil.QilPatternFactory.BaseFactory, System.Xml.Xsl.Xslt.QilGenerator.CompileDataTypeAttribute(), System.Xml.Xsl.Xslt.QilGenerator.CompileLangAttribute(), System.Xml.Xsl.Xslt.QilGenerator.CompileOrderAttribute(), System.Xml.Xsl.Xslt.QilGenerator.CompileXPathExpression(), System.Xml.Xsl.XPath.XPathQilFactory.ConvertToString(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.QilGenerator.EnterScope(), System.Xml.Xsl.Xslt.QilGenerator.ExitScope(), System.Xml.Xsl.Xslt.QilStrConcatenator.Reset(), System.Xml.Xsl.Qil.QilPatternFactory.SortKey(), System.Xml.Xsl.Xslt.QilStrConcatenator.ToQil(), and System.value.

Referenced by System.Xml.Xsl.Xslt.QilGenerator.CompileSorts().