1 write to Elements
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6399
this.
Elements
= elements;
47 references to Elements
Microsoft.CodeAnalysis.CSharp (47)
Binder\Binder.ValueChecks.cs (1)
4519
if (expr.Type?.IsRefLikeType != true || expr.
Elements
.Length == 0)
Binder\Binder_Attributes.cs (1)
878
var elements = collection.
Elements
;
Binder\Semantics\Conversions\Conversions.cs (1)
184
var elements = node.
Elements
;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
649
if (argument.
Elements
.Length == 0)
659
foreach (var element in argument.
Elements
)
874
if (argument.
Elements
.Length == 0)
884
foreach (var element in argument.
Elements
)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3033
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)
2070
VisitCollectionExpression(node.
Elements
);
2076
VisitCollectionExpression(node.
Elements
);
FlowAnalysis\NullableWalker.cs (6)
3755
var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.
Elements
.Length);
3757
foreach (var element in node.
Elements
)
7078
elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.
Elements
.CastArray<BoundExpression>();
8022
Debug.Assert(collectionExpressionVisitResults.Length == collection.
Elements
.Length);
8027
if (collection.
Elements
[i] is BoundExpression elementExpression)
8034
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)
6422
if (elements != this.
Elements
)
6467
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))
10526
this.VisitList(node.
Elements
);
10531
this.VisitList(node.
Elements
);
11810
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
11821
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14062
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
14085
ImmutableArray<BoundNode> elements = this.VisitList(node.
Elements
);
16499
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
16515
new TreeDumperNode("elements", null, from x in node.
Elements
select Visit(x, null)),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (14)
55
return CreateAndPopulateList(node, listElementType, node.
Elements
.SelectAsArray(static (element, node) => unwrapListElement(node, element), node));
69
if (node.
Elements
.IsEmpty &&
101
var elements = node.
Elements
;
164
if (node.
Elements
is not [BoundCollectionExpressionSpreadElement singleSpread])
224
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { Type: NamedTypeSymbol spreadType } expr }],
254
var elements = node.
Elements
;
336
var elements = node.
Elements
;
406
var elements = node.
Elements
;
519
&& node.
Elements
.Length > 0
528
node.
Elements
.Length > 0 &&
530
node.
Elements
.All(e => ((BoundExpression)e).ConstantValueOpt is { });
536
node.
Elements
.Length > 0 &&
661
if (node is {
Elements
: [BoundCollectionExpressionSpreadElement { Expression: { } spreadExpression } spreadElement] }
722
var elements = node.
Elements
;
Operations\CSharpOperationFactory.cs (1)
1229
ImmutableArray<IOperation> elements = expr.
Elements
.SelectAsArray((element, expr) => CreateBoundCollectionExpressionElement(expr, element), expr);