1 write to Elements
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6401
this.
Elements
= elements;
52 references to Elements
Microsoft.CodeAnalysis.CSharp (52)
Binder\Binder.ValueChecks.cs (1)
4635
if (expr.Type?.IsRefLikeType != true || expr.
Elements
.Length == 0)
Binder\Binder_Attributes.cs (1)
878
var elements = collection.
Elements
;
Binder\Binder_Conversions.cs (5)
878
var elements = node.
Elements
;
1690
else if (arg is BoundConversion { Operand: BoundCollectionExpression {
Elements
: [BoundExpression collectionElement] } })
1730
var builder = ArrayBuilder<BoundNode>.GetInstance(node.
Elements
.Length);
1731
foreach (var element in node.
Elements
)
1784
var elements = node.
Elements
;
Binder\Semantics\Conversions\Conversions.cs (1)
186
var elements = node.
Elements
;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
675
if (argument.
Elements
.Length == 0)
685
foreach (var element in argument.
Elements
)
900
if (argument.
Elements
.Length == 0)
910
foreach (var element in argument.
Elements
)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3055
collectionExpression.
Elements
,
BoundTree\BoundCollectionExpression.cs (2)
20
for (int i = 0; i <
Elements
.Length; i++)
22
if (
Elements
[i] is BoundCollectionExpressionSpreadElement spreadElement)
BoundTree\BoundNode.cs (2)
368
ImmutableArray<BoundNode>.CastUp(collection.
Elements
.CastArray<BoundExpression>()) == collection.
Elements
);
FlowAnalysis\AbstractFlowPass.cs (2)
2076
VisitCollectionExpression(node.
Elements
);
2082
VisitCollectionExpression(node.
Elements
);
FlowAnalysis\NullableWalker.cs (6)
3852
var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.
Elements
.Length);
3854
foreach (var element in node.
Elements
)
7312
elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.
Elements
.CastArray<BoundExpression>();
8273
Debug.Assert(collectionExpressionVisitResults.Length == collection.
Elements
.Length);
8278
if (collection.
Elements
[i] is BoundExpression elementExpression)
8285
elementsBuilder.Add(collection.
Elements
[i]);
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
122
this.VisitList(node.UnconvertedCollectionExpression.
Elements
);
129
foreach (var element in node.
Elements
)
Generated\BoundNodes.xml.Generated.cs (10)
6424
if (elements != this.
Elements
)
6469
if (collectionTypeKind != this.CollectionTypeKind || placeholder != this.Placeholder || collectionCreation != this.CollectionCreation || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(collectionBuilderMethod, this.CollectionBuilderMethod) || collectionBuilderInvocationPlaceholder != this.CollectionBuilderInvocationPlaceholder || collectionBuilderInvocationConversion != this.CollectionBuilderInvocationConversion || wasTargetTyped != this.WasTargetTyped || unconvertedCollectionExpression != this.UnconvertedCollectionExpression || elements != this.
Elements
|| !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
10528
this.VisitList(node.
Elements
);
10533
this.VisitList(node.
Elements
);
11927
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
11939
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14211
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14234
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
16649
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
16665
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (14)
54
return CreateAndPopulateList(node, listElementType, node.
Elements
.SelectAsArray(static (element, node) => unwrapListElement(node, element), node));
68
if (node.
Elements
.IsEmpty &&
100
var elements = node.
Elements
;
163
if (node.
Elements
is not [BoundCollectionExpressionSpreadElement singleSpread])
223
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { Type: NamedTypeSymbol spreadType } expr }],
253
var elements = node.
Elements
;
335
var elements = node.
Elements
;
405
var elements = node.
Elements
;
518
&& node.
Elements
.Length > 0
527
node.
Elements
.Length > 0 &&
529
node.
Elements
.All(e => ((BoundExpression)e).ConstantValueOpt is { });
535
node.
Elements
.Length > 0 &&
660
if (node is {
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { } spreadExpression } spreadElement] }
721
var elements = node.
Elements
;
Operations\CSharpOperationFactory.cs (1)
1229
ImmutableArray<IOperation> elements = expr.
Elements
.SelectAsArray((element, expr) => CreateBoundCollectionExpressionElement(expr, element), expr);