1 write to Elements
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6459
this.
Elements
= elements;
57 references to Elements
Microsoft.CodeAnalysis.CSharp (57)
Binder\Binder.ValueChecks.cs (1)
4785
if (!expr.HasWithElement && expr.
Elements
.IsEmpty)
Binder\Binder_Attributes.cs (1)
880
var elements = collection.
Elements
;
Binder\Binder_Conversions.cs (6)
993
var elements = _node.
Elements
;
1086
var elements = _node.
Elements
;
2197
else if (arg is BoundConversion { Operand: BoundCollectionExpression {
Elements
: [BoundExpression collectionElement] } })
2248
var elementsBuilder = ArrayBuilder<BoundNode>.GetInstance(node.
Elements
.Length);
2250
foreach (var element in node.
Elements
)
2306
var elements = node.
Elements
;
Binder\RefSafetyAnalysis.cs (2)
1322
var safeContext = node.
Elements
.Length == 0 || LocalRewriter.ShouldUseRuntimeHelpersCreateSpan(node, elementType.Type)
1338
VisitList(node.
Elements
);
Binder\Semantics\Conversions\Conversions.cs (1)
186
var elements = node.
Elements
;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
677
if (argument.
Elements
.Length == 0)
687
foreach (var element in argument.
Elements
)
902
if (argument.
Elements
.Length == 0)
912
foreach (var element in argument.
Elements
)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3072
collectionExpression.
Elements
,
BoundTree\BoundCollectionExpression.cs (3)
70
foreach (var element in
Elements
)
85
for (int i = 0; i <
Elements
.Length; i++)
87
if (
Elements
[i] is BoundCollectionExpressionSpreadElement spreadElement)
BoundTree\BoundNode.cs (2)
368
ImmutableArray<BoundNode>.CastUp(collection.
Elements
.CastArray<BoundExpression>()) == collection.
Elements
);
FlowAnalysis\AbstractFlowPass.cs (2)
2077
VisitCollectionExpression(node.
Elements
);
2083
VisitCollectionExpression(node.
Elements
);
FlowAnalysis\NullableWalker.cs (6)
3883
var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.
Elements
.Length);
3885
foreach (var element in node.
Elements
)
7713
elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.
Elements
.CastArray<BoundExpression>();
8720
Debug.Assert(collectionExpressionVisitResults.Length == collection.
Elements
.Length);
8725
if (collection.
Elements
[i] is BoundExpression elementExpression)
8732
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)
6488
if (withElement != this.WithElement || elements != this.
Elements
)
6569
if (collectionTypeKind != this.CollectionTypeKind || placeholder != this.Placeholder || collectionCreation != this.CollectionCreation || !Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(collectionBuilderMethod, this.CollectionBuilderMethod) || collectionBuilderElementsPlaceholder != this.CollectionBuilderElementsPlaceholder || wasTargetTyped != this.WasTargetTyped || hasWithElement != this.HasWithElement || unconvertedCollectionExpression != this.UnconvertedCollectionExpression || elements != this.
Elements
|| !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
10643
this.VisitList(node.
Elements
);
10654
this.VisitList(node.
Elements
);
12057
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
12073
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14349
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14371
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
16788
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
16812
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (15)
74
node.
Elements
.SelectAsArray(static (element, node) => unwrapListElement(node, element), node),
110
var elements = node.
Elements
;
173
if (node.
Elements
is not [BoundCollectionExpressionSpreadElement singleSpread])
233
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { Type: NamedTypeSymbol spreadType } expr }],
290
if (node.
Elements
.IsEmpty &&
325
var elements = node.
Elements
;
403
var list = CreateAndPopulateList(node, arrayType.ElementTypeWithAnnotations, node.
Elements
,
423
var elements = node.
Elements
;
493
var elements = node.
Elements
;
615
&& node.
Elements
.Length > 0
624
node.
Elements
.Length > 0 &&
626
node.
Elements
.All(e => ((BoundExpression)e).ConstantValueOpt is { });
632
node.
Elements
.Length > 0 &&
760
if (node is {
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { } spreadExpression } spreadElement] }
828
var elements = node.
Elements
;
Operations\CSharpOperationFactory.cs (1)
1243
expr.
Elements
.SelectAsArray((element, expr) => CreateBoundCollectionExpressionElement(expr, element), expr),