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

◆ ValidateListInitArgs()

static void System.Linq.Expressions.Expression< TDelegate >.ValidateListInitArgs ( Type listType,
ReadOnlyCollection< ElementInit > initializers,
string listTypeParamName )
inlinestaticprivateinherited

Definition at line 3908 of file Expression.cs.

3909 {
3910 if (!typeof(IEnumerable).IsAssignableFrom(listType))
3911 {
3912 throw Error.TypeNotIEnumerable(listType, listTypeParamName);
3913 }
3914 int i = 0;
3915 for (int count = initializers.Count; i < count; i++)
3916 {
3918 ContractUtils.RequiresNotNull(elementInit, "initializers", i);
3920 }
3921 }
static void RequiresNotNull(object value, string paramName)
static void ValidateCallInstanceType(Type instanceType, MethodInfo method)
static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments)

References System.Linq.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Dynamic.Utils.ContractUtils.RequiresNotNull(), System.Linq.Expressions.Error.TypeNotIEnumerable(), and System.Linq.Expressions.Expression< TDelegate >.ValidateCallInstanceType().

Referenced by System.Linq.Expressions.Expression< TDelegate >.ListBind(), and System.Linq.Expressions.Expression< TDelegate >.ListInit().