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

◆ Visit() [2/2]

ReadOnlyCollection< Expression > System.Linq.Expressions.ExpressionVisitor.Visit ( ReadOnlyCollection< Expression > nodes)
inlineinherited

Definition at line 16 of file ExpressionVisitor.cs.

17 {
18 ContractUtils.RequiresNotNull(nodes, "nodes");
19 Expression[] array = null;
20 int i = 0;
21 for (int count = nodes.Count; i < count; i++)
22 {
23 Expression expression = Visit(nodes[i]);
24 if (array != null)
25 {
26 array[i] = expression;
27 }
28 else if (expression != nodes[i])
29 {
30 array = new Expression[count];
31 for (int j = 0; j < i; j++)
32 {
33 array[j] = nodes[j];
34 }
35 array[i] = expression;
36 }
37 }
38 if (array == null)
39 {
40 return nodes;
41 }
43 }
static void RequiresNotNull(object value, string paramName)
virtual ? Expression Visit(Expression? node)

References System.array, System.Linq.count, System.Collections.ObjectModel.ReadOnlyCollection< T >.Count, System.Dynamic.Utils.ContractUtils.RequiresNotNull(), and System.Linq.Expressions.ExpressionVisitor.Visit().