3 instantiations of ElementInit
System.Linq.Expressions (3)
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (1)
172
newInits[i] = new
ElementInit
(_inits[i].AddMethod, new TrueReadOnlyCollection<Expression>(cr[0, -1]!));
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
665
newInits[i] = new
ElementInit
(inits[i].AddMethod, new TrueReadOnlyCollection<Expression>(cr[0, -1]!));
System\Linq\Expressions\ElementInit.cs (1)
99
return new
ElementInit
(addMethod, argumentsRO);
72 references to ElementInit
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
ExpressionTrees\Sources\ExprLambdaUtils.vb (3)
297
Protected Overrides Function VisitElementInit(node As
ElementInit
) As
ElementInit
302
Private 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)
1071
private void EmitListInit(ReadOnlyCollection<
ElementInit
> initializers, bool keepOnStack, Type objectType)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (1)
666
var initializers = new List<
ElementInit
>(tests);
System\Linq\Expressions\Compiler\StackSpiller.Bindings.cs (5)
131
private readonly ReadOnlyCollection<
ElementInit
> _inits;
144
ElementInit
init = _inits[i];
162
ElementInit
[] newInits = new
ElementInit
[count];
175
return new MemberListBinding(_binding.Member, new TrueReadOnlyCollection<
ElementInit
>(newInits));
System\Linq\Expressions\Compiler\StackSpiller.cs (5)
633
ReadOnlyCollection<
ElementInit
> inits = node.Initializers;
640
ElementInit
init = inits[i];
655
ElementInit
[] newInits = new
ElementInit
[count];
668
expr = new ListInitExpression((NewExpression)rewrittenNew, new TrueReadOnlyCollection<
ElementInit
>(newInits));
System\Linq\Expressions\DebugViewWriter.cs (2)
810
protected override
ElementInit
VisitElementInit(
ElementInit
node)
System\Linq\Expressions\ElementInit.cs (7)
60
public
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>
78
public 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>
89
public static
ElementInit
ElementInit(MethodInfo addMethod, IEnumerable<Expression> arguments)
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
250
public ReadOnlyCollection<
ElementInit
> Initializers => _node.Initializers;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
107
internal static string ElementInitBindingToString(
ElementInit
node)
480
protected override
ElementInit
VisitElementInit(
ElementInit
initializer)
System\Linq\Expressions\ExpressionVisitor.cs (3)
572
/// Visits the children of the <see cref="
ElementInit
"/>.
577
protected 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)
2692
ReadOnlyCollection<
ElementInit
> initializers = node.Initializers;
2696
private void CompileListInit(ReadOnlyCollection<
ElementInit
> initializers)
2700
ElementInit
initializer = initializers[i];
System\Linq\Expressions\ListInitExpression.cs (17)
24
internal ListInitExpression(NewExpression newExpression, ReadOnlyCollection<
ElementInit
> initializers)
55
public ReadOnlyCollection<
ElementInit
> Initializers { get; }
85
public 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>
130
return new ListInitExpression(newExpression, ReadOnlyCollection<
ElementInit
>.Empty);
170
ElementInit
[] initList = new
ElementInit
[initializerlist.Count];
175
return 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>
191
public static ListInitExpression ListInit(NewExpression newExpression, params
ElementInit
[] initializers)
193
return 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>
206
public static ListInitExpression ListInit(NewExpression newExpression, IEnumerable<
ElementInit
> initializers)
210
ReadOnlyCollection<
ElementInit
> initializerlist = initializers.ToReadOnly();
System\Linq\Expressions\MemberInitExpression.cs (2)
86
Expression listExpression, ReadOnlyCollection<
ElementInit
> initializers, bool keepOnStack)
94
ElementInit
element = initializers[i];
System\Linq\Expressions\MemberListBinding.cs (16)
19
internal MemberListBinding(MemberInfo member, ReadOnlyCollection<
ElementInit
> initializers)
30
public ReadOnlyCollection<
ElementInit
> Initializers { get; }
39
public 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>
67
public static MemberListBinding ListBind(MemberInfo member, params
ElementInit
[] initializers)
69
return 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>
80
public static MemberListBinding ListBind(MemberInfo member, IEnumerable<
ElementInit
> initializers)
86
ReadOnlyCollection<
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>
100
public static MemberListBinding ListBind(MethodInfo propertyAccessor, params
ElementInit
[] initializers)
102
return 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>
114
public static MemberListBinding ListBind(MethodInfo propertyAccessor, IEnumerable<
ElementInit
> initializers)
121
private static void ValidateListInitArgs(Type listType, ReadOnlyCollection<
ElementInit
> initializers, string listTypeParamName)
129
ElementInit
element = initializers[i];