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

◆ VisitRuntimeVariables()

override Expression System.Runtime.CompilerServices.RuntimeOps.ExpressionQuoter.VisitRuntimeVariables ( RuntimeVariablesExpression node)
inlinepackagevirtual

Reimplemented from System.Linq.Expressions.ExpressionVisitor.

Definition at line 158 of file RuntimeOps.cs.

159 {
160 int count = node.Variables.Count;
163 int[] array = new int[count];
164 for (int i = 0; i < array.Length; i++)
165 {
166 IStrongBox box = GetBox(node.Variables[i]);
167 if (box == null)
168 {
169 array[i] = list2.Count;
170 list2.Add(node.Variables[i]);
171 }
172 else
173 {
174 array[i] = -1 - list.Count;
175 list.Add(box);
176 }
177 }
178 if (list.Count == 0)
179 {
180 return node;
181 }
183 if (list2.Count == 0)
184 {
185 return constantExpression;
186 }
188 }
void Add(TKey key, TValue value)
static ConstantExpression Constant(object? value)
static MethodCallExpression Call(MethodInfo method)
static RuntimeVariablesExpression RuntimeVariables(params ParameterExpression[] variables)
IStrongBox GetBox(ParameterExpression variable)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.array, System.Linq.Expressions.Expression< TDelegate >.Call(), System.Linq.Expressions.Expression< TDelegate >.Constant(), System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Runtime.CompilerServices.RuntimeOps.ExpressionQuoter.GetBox(), System.list, System.Linq.Expressions.CachedReflectionInfo.RuntimeOps_MergeRuntimeVariables, System.Linq.Expressions.Expression< TDelegate >.RuntimeVariables(), and System.Linq.Expressions.RuntimeVariables.