1 write to Elements
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6476
this.
Elements
= elements;
59 references to Elements
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder_Attributes.cs (1)
886
var elements = collection.
Elements
;
Binder\Binder_Conversions.cs (6)
1052
var elements = _node.
Elements
;
1154
var elements = _node.
Elements
;
2275
else if (arg is BoundConversion { Operand: BoundCollectionExpression {
Elements
: [BoundExpression collectionElement] } })
2326
var elementsBuilder = ArrayBuilder<BoundNode>.GetInstance(node.
Elements
.Length);
2328
foreach (var element in node.
Elements
)
2384
var elements = node.
Elements
;
Binder\Binder.ValueChecks.cs (2)
4766
if (!expr.HasWithElement && expr.
Elements
.IsEmpty)
4803
foreach (var element in expr.
Elements
)
Binder\RefSafetyAnalysis.cs (4)
1415
var safeContext = node.
Elements
.Length == 0 || LocalRewriter.ShouldUseRuntimeHelpersCreateSpan(node, elementType.Type)
1437
VisitList(node.
Elements
);
1449
foreach (var element in node.
Elements
)
1501
if (node.CollectionCreation is BoundObjectCreationExpression { Constructor: { } } objectCreation && !node.
Elements
.IsEmpty)
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)
3074
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)
2088
VisitCollectionExpression(node.
Elements
);
2094
VisitCollectionExpression(node.
Elements
);
FlowAnalysis\NullableWalker.cs (6)
3991
var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.
Elements
.Length);
3993
foreach (var element in node.
Elements
)
7938
elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.
Elements
.CastArray<BoundExpression>();
8983
Debug.Assert(collectionExpressionVisitResults.Length == collection.
Elements
.Length);
8988
if (collection.
Elements
[i] is BoundExpression elementExpression)
8995
elementsBuilder.Add(collection.
Elements
[i]);
Generated\BoundNodes.xml.Generated.cs (10)
6505
if (withElement != this.WithElement || elements != this.
Elements
)
6586
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))
10776
this.VisitList(node.
Elements
);
10787
this.VisitList(node.
Elements
);
12210
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
12226
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14523
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14545
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
17002
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
17026
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (16)
69
node.
Elements
.SelectAsArray(static (element, node) => unwrapListElement(node, element), node),
105
var elements = node.
Elements
;
168
if (node.
Elements
is not [BoundCollectionExpressionSpreadElement singleSpread])
228
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { Type: NamedTypeSymbol spreadType } expr }],
285
var elements = node.
Elements
;
339
var elements = node.
Elements
;
405
var list = CreateAndPopulateList(node, elementType, node.
Elements
,
468
var list = CreateAndPopulateList(node, arrayType.ElementTypeWithAnnotations, node.
Elements
,
488
var elements = node.
Elements
;
558
var elements = node.
Elements
;
680
&& node.
Elements
.Length > 0
689
node.
Elements
.Length > 0 &&
691
node.
Elements
.All(e => ((BoundExpression)e).ConstantValueOpt is { });
697
node.
Elements
.Length > 0 &&
825
if (node is {
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { } spreadExpression } spreadElement] }
893
var elements = node.
Elements
;
Operations\CSharpOperationFactory.cs (1)
1287
expr.
Elements
.SelectAsArray((element, expr) => CreateBoundCollectionExpressionElement(expr, element), expr),