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

◆ CheckNodeCost()

int System.Xml.Xsl.Xslt.XslAstRewriter.CheckNodeCost ( XslNode node)
inlineprivate

Definition at line 58 of file XslAstRewriter.cs.

59 {
60 _scope.EnterScope(node.Namespaces);
61 bool flag = false;
62 int num = 1;
63 if (NodeTypeTest(node.NodeType, -247451132))
64 {
65 num += NodeCostForXPath(node.Select);
66 }
67 IList<XslNode> content = node.Content;
68 int num2 = content.Count - 1;
69 for (int i = 0; i <= num2; i++)
70 {
71 XslNode xslNode = content[i];
73 num += num3;
74 if (flag && num > 100)
75 {
77 {
78 Refactor(node, i);
79 num -= num3;
80 num++;
81 }
82 break;
83 }
84 if (xslNode.NodeType == XslNodeType.Variable || xslNode.NodeType == XslNodeType.Param)
85 {
86 _scope.AddVariable(xslNode.Name, (VarPar)xslNode);
87 if (xslNode.NodeType == XslNodeType.Param)
88 {
89 num -= num3;
90 }
91 }
92 else if (!flag)
93 {
94 flag = NodeTypeTest(node.NodeType, -1025034872);
95 }
96 }
97 _scope.ExitScope();
98 return num;
99 }
static int NodeCostForXPath(string xpath)
void Refactor(XslNode parent, int split)
CompilerScopeManager< VarPar > _scope
static bool NodeTypeTest(XslNodeType nodetype, int flags)

References System.Xml.Xsl.Xslt.XslAstRewriter._scope, System.Xml.Xsl.Xslt.XslAstRewriter.CheckNodeCost(), System.Xml.Dictionary, System.Xml.Xsl.Xslt.XslAstRewriter.NodeCostForXPath(), System.Xml.Xsl.Xslt.XslAstRewriter.NodeTypeTest(), and System.Xml.Xsl.Xslt.XslAstRewriter.Refactor().

Referenced by System.Xml.Xsl.Xslt.XslAstRewriter.CheckNodeCost(), and System.Xml.Xsl.Xslt.XslAstRewriter.Rewrite().