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