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

◆ ValidateVariables()

static void System.Linq.Expressions.Expression< TDelegate >.ValidateVariables ( ReadOnlyCollection< ParameterExpression< TDelegate > > varList,
string collectionName )
inlinestaticpackageinherited

Definition at line 2234 of file Expression.cs.

2235 {
2236 int count = varList.Count;
2237 if (count == 0)
2238 {
2239 return;
2240 }
2242 for (int i = 0; i < count; i++)
2243 {
2244 ParameterExpression parameterExpression = varList[i];
2246 if (parameterExpression.IsByRef)
2247 {
2248 throw Error.VariableMustNotBeByRef(parameterExpression, parameterExpression.Type, collectionName, i);
2249 }
2251 {
2252 throw Error.DuplicateVariable(parameterExpression, collectionName, i);
2253 }
2254 }
2255 }
void Add(TKey key, TValue value)
static void RequiresNotNull(object value, string paramName)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Linq.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Linq.Expressions.Error.DuplicateVariable(), System.Dynamic.Utils.ContractUtils.RequiresNotNull(), and System.Linq.Expressions.Error.VariableMustNotBeByRef().

Referenced by System.Linq.Expressions.Expression< TDelegate >.BlockCore(), System.Linq.Expressions.ScopeExpression.ReuseOrValidateVariables(), System.Linq.Expressions.Scope1.Rewrite(), System.Linq.Expressions.ScopeN.Rewrite(), and System.Linq.Expressions.ScopeWithType.Rewrite().