Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ Execute()

override void System.Xml.Xsl.XsltOld.VariableAction.Execute ( Processor processor,
ActionFrame frame )
inlinepackage

Definition at line 120 of file VariableAction.cs.

121 {
122 object obj = null;
123 switch (frame.State)
124 {
125 default:
126 return;
127 case 0:
128 {
129 if (IsGlobal)
130 {
131 if (frame.GetVariable(_varKey) != null)
132 {
133 frame.Finished();
134 return;
135 }
136 frame.SetVariable(_varKey, BeingComputedMark);
137 }
138 if (varType == VariableType.GlobalParameter)
139 {
140 obj = processor.GetGlobalParameter(name);
141 }
142 else if (varType == VariableType.LocalParameter)
143 {
144 obj = processor.GetParameter(name);
145 }
146 if (obj != null)
147 {
148 break;
149 }
150 if (selectKey != -1)
151 {
152 obj = processor.RunQuery(frame, selectKey);
153 break;
154 }
155 if (containedActions == null)
156 {
157 obj = string.Empty;
158 break;
159 }
160 NavigatorOutput output = new NavigatorOutput(baseUri);
161 processor.PushOutput(output);
162 processor.PushActionFrame(frame);
163 frame.State = 1;
164 return;
165 }
166 case 1:
167 {
168 IRecordOutput recordOutput = processor.PopOutput();
169 obj = ((NavigatorOutput)recordOutput).Navigator;
170 break;
171 }
172 case 2:
173 break;
174 }
175 frame.SetVariable(_varKey, obj);
176 frame.Finished();
177 }

References System.Xml.Xsl.XsltOld.VariableAction._varKey, System.Xml.Xsl.XsltOld.VariableAction.baseUri, System.Xml.Xsl.XsltOld.VariableAction.BeingComputedMark, System.Xml.Xsl.XsltOld.ContainerAction.containedActions, System.Xml.Dictionary, System.Xml.Xsl.XsltOld.ActionFrame.Finished(), System.Xml.Xsl.XsltOld.ActionFrame.GetVariable(), System.Xml.Xsl.XsltOld.VariableAction.IsGlobal, System.Xml.Xsl.XsltOld.VariableAction.name, System.obj, System.Xml.Xsl.XsltOld.VariableAction.selectKey, System.Xml.Xsl.XsltOld.ActionFrame.SetVariable(), System.Xml.Xsl.XsltOld.ActionFrame.State, and System.Xml.Xsl.XsltOld.VariableAction.varType.