3 instantiations of ElementInit
System.Linq.Expressions (3)
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (1)
172newInits[i] = new ElementInit(_inits[i].AddMethod, new TrueReadOnlyCollection<Expression>(cr[0, -1]!));
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
665newInits[i] = new ElementInit(inits[i].AddMethod, new TrueReadOnlyCollection<Expression>(cr[0, -1]!));
System\Linq\Expressions\ElementInit.cs (1)
99return new ElementInit(addMethod, argumentsRO);
72 references to ElementInit
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
ExpressionTrees\Sources\ExprLambdaUtils.vb (3)
297Protected Overrides Function VisitElementInit(node As ElementInit) As ElementInit 302Private Overloads Sub Visit(node As ElementInit)
netstandard (1)
netstandard.cs (1)
995[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.ElementInit))]
System.Core (1)
System.Core.cs (1)
133[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.ElementInit))]
System.Linq.Expressions (67)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
1071private void EmitListInit(ReadOnlyCollection<ElementInit> initializers, bool keepOnStack, Type objectType)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
666var initializers = new List<ElementInit>(tests);
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (5)
131private readonly ReadOnlyCollection<ElementInit> _inits; 144ElementInit init = _inits[i]; 162ElementInit[] newInits = new ElementInit[count]; 175return new MemberListBinding(_binding.Member, new TrueReadOnlyCollection<ElementInit>(newInits));
System\Linq\Expressions\Compiler\StackSpiller.cs (5)
633ReadOnlyCollection<ElementInit> inits = node.Initializers; 640ElementInit init = inits[i]; 655ElementInit[] newInits = new ElementInit[count]; 668expr = new ListInitExpression((NewExpression)rewrittenNew, new TrueReadOnlyCollection<ElementInit>(newInits));
System\Linq\Expressions\DebugViewWriter.cs (2)
810protected override ElementInit VisitElementInit(ElementInit node)
System\Linq\Expressions\ElementInit.cs (7)
60public ElementInit Update(IEnumerable<Expression> arguments) 73/// Creates an <see cref="Expressions.ElementInit" /> expression that represents the initialization of a list. 77/// <returns>The created <see cref="Expressions.ElementInit" /> expression.</returns> 78public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) 84/// Creates an <see cref="Expressions.ElementInit" /> expression that represents the initialization of a list. 88/// <returns>The created <see cref="Expressions.ElementInit" /> expression.</returns> 89public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable<Expression> arguments)
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
250public ReadOnlyCollection<ElementInit> Initializers => _node.Initializers;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
107internal static string ElementInitBindingToString(ElementInit node) 480protected override ElementInit VisitElementInit(ElementInit initializer)
System\Linq\Expressions\ExpressionVisitor.cs (3)
572/// Visits the children of the <see cref="ElementInit"/>. 577protected virtual ElementInit VisitElementInit(ElementInit node)
System\Linq\Expressions\IArgumentProvider.cs (1)
8/// <see cref="ElementInit"/>, <see cref="MethodCallExpression"/>, <see cref="InvocationExpression"/>,
System\Linq\Expressions\Interpreter\LightCompiler.cs (3)
2692ReadOnlyCollection<ElementInit> initializers = node.Initializers; 2696private void CompileListInit(ReadOnlyCollection<ElementInit> initializers) 2700ElementInit initializer = initializers[i];
System\Linq\Expressions\ListInitExpression.cs (17)
24internal ListInitExpression(NewExpression newExpression, ReadOnlyCollection<ElementInit> initializers) 55public ReadOnlyCollection<ElementInit> Initializers { get; } 85public ListInitExpression Update(NewExpression newExpression, IEnumerable<ElementInit> initializers) 118/// <param name="initializers">An <see cref="IEnumerable{T}"/> that contains <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="ListInitExpression.Initializers"/> collection.</param> 130return new ListInitExpression(newExpression, ReadOnlyCollection<ElementInit>.Empty); 170ElementInit[] initList = new ElementInit[initializerlist.Count]; 175return ListInit(newExpression, new TrueReadOnlyCollection<ElementInit>(initList)); 179/// Creates a <see cref="ListInitExpression"/> that uses specified <see cref="Expressions.ElementInit"/> objects to initialize a collection. 182/// <param name="initializers">An array that contains <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="ListInitExpression.Initializers"/> collection.</param> 191public static ListInitExpression ListInit(NewExpression newExpression, params ElementInit[] initializers) 193return ListInit(newExpression, (IEnumerable<ElementInit>)initializers); 197/// Creates a <see cref="ListInitExpression"/> that uses specified <see cref="Expressions.ElementInit"/> objects to initialize a collection. 200/// <param name="initializers">An <see cref="IEnumerable{T}"/> that contains <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="ListInitExpression.Initializers"/> collection.</param> 201/// <returns>An <see cref="IEnumerable{T}"/> that contains <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="ListInitExpression.Initializers"/> collection.</returns> 206public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable<ElementInit> initializers) 210ReadOnlyCollection<ElementInit> initializerlist = initializers.ToReadOnly();
System\Linq\Expressions\MemberInitExpression.cs (2)
86Expression listExpression, ReadOnlyCollection<ElementInit> initializers, bool keepOnStack) 94ElementInit element = initializers[i];
System\Linq\Expressions\MemberListBinding.cs (16)
19internal MemberListBinding(MemberInfo member, ReadOnlyCollection<ElementInit> initializers) 30public ReadOnlyCollection<ElementInit> Initializers { get; } 39public MemberListBinding Update(IEnumerable<ElementInit> initializers) 62/// <param name="initializers">An array of <see cref="System.Linq.Expressions.ElementInit"/> objects to use to populate the <see cref="MemberListBinding.Initializers"/> collection.</param> 67public static MemberListBinding ListBind(MemberInfo member, params ElementInit[] initializers) 69return ListBind(member, (IEnumerable<ElementInit>)initializers); 75/// <param name="initializers">An <see cref="IEnumerable{T}"/> that contains <see cref="System.Linq.Expressions.ElementInit"/> objects to use to populate the <see cref="MemberListBinding.Initializers"/> collection.</param> 80public static MemberListBinding ListBind(MemberInfo member, IEnumerable<ElementInit> initializers) 86ReadOnlyCollection<ElementInit> initList = initializers.ToReadOnly(); 94/// <param name="initializers">An array of <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="MemberListBinding.Initializers"/> collection.</param> 100public static MemberListBinding ListBind(MethodInfo propertyAccessor, params ElementInit[] initializers) 102return ListBind(propertyAccessor, (IEnumerable<ElementInit>)initializers); 108/// <param name="initializers">An <see cref="IEnumerable{T}"/> that contains <see cref="Expressions.ElementInit"/> objects to use to populate the <see cref="MemberListBinding.Initializers"/> collection.</param> 114public static MemberListBinding ListBind(MethodInfo propertyAccessor, IEnumerable<ElementInit> initializers) 121private static void ValidateListInitArgs(Type listType, ReadOnlyCollection<ElementInit> initializers, string listTypeParamName) 129ElementInit element = initializers[i];