1 write to Elements
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
6408this.Elements = elements;
53 references to Elements
Microsoft.CodeAnalysis.CSharp (53)
Binder\Binder.ValueChecks.cs (1)
4776if (expr.Type?.IsRefLikeType != true || expr.Elements.Length == 0)
Binder\Binder_Attributes.cs (1)
880var elements = collection.Elements;
Binder\Binder_Conversions.cs (5)
878var elements = node.Elements; 1677else if (arg is BoundConversion { Operand: BoundCollectionExpression { Elements: [BoundExpression collectionElement] } }) 1717var builder = ArrayBuilder<BoundNode>.GetInstance(node.Elements.Length); 1718foreach (var element in node.Elements) 1771var elements = node.Elements;
Binder\Semantics\Conversions\Conversions.cs (1)
186var elements = node.Elements;
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (4)
677if (argument.Elements.Length == 0) 687foreach (var element in argument.Elements) 902if (argument.Elements.Length == 0) 912foreach (var element in argument.Elements)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
3065collectionExpression.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)
2078VisitCollectionExpression(node.Elements); 2084VisitCollectionExpression(node.Elements);
FlowAnalysis\NullableWalker.cs (6)
3873var resultBuilder = ArrayBuilder<VisitResult>.GetInstance(node.Elements.Length); 3875foreach (var element in node.Elements) 7556elements = ((BoundCollectionExpression)((BoundConversion)argument).Operand).UnconvertedCollectionExpression.Elements.CastArray<BoundExpression>(); 8563Debug.Assert(collectionExpressionVisitResults.Length == collection.Elements.Length); 8568if (collection.Elements[i] is BoundExpression elementExpression) 8575elementsBuilder.Add(collection.Elements[i]);
FlowAnalysis\NullableWalker.DebugVerifier.cs (2)
122this.VisitList(node.UnconvertedCollectionExpression.Elements); 127foreach (var element in node.Elements)
Generated\BoundNodes.xml.Generated.cs (10)
6431if (elements != this.Elements) 6476if (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)) 10536this.VisitList(node.Elements); 10541this.VisitList(node.Elements); 11937ImmutableArray<BoundNode> elements = this.VisitList(node.Elements); 11949ImmutableArray<BoundNode> elements = this.VisitList(node.Elements); 14207ImmutableArray<BoundNode> elements = this.VisitList(node.Elements); 14230ImmutableArray<BoundNode> elements = this.VisitList(node.Elements); 16637new TreeDumperNode("elements", null, from x in node.Elements select Visit(x, null)), 16653new TreeDumperNode("elements", null, from x in node.Elements select Visit(x, null)),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (15)
53return CreateAndPopulateList(node, listElementType, node.Elements.SelectAsArray(static (element, node) => unwrapListElement(node, element), node)); 85var elements = node.Elements; 148if (node.Elements is not [BoundCollectionExpressionSpreadElement singleSpread]) 208Elements: [BoundCollectionExpressionSpreadElement { Expression: { Type: NamedTypeSymbol spreadType } expr }], 262if (node.Elements.IsEmpty && 297var elements = node.Elements; 375var list = CreateAndPopulateList(node, arrayType.ElementTypeWithAnnotations, node.Elements); 392var elements = node.Elements; 462var elements = node.Elements; 578&& node.Elements.Length > 0 587node.Elements.Length > 0 && 589node.Elements.All(e => ((BoundExpression)e).ConstantValueOpt is { }); 595node.Elements.Length > 0 && 723if (node is { Elements: [BoundCollectionExpressionSpreadElement { Expression: { } spreadExpression } spreadElement] } 791var elements = node.Elements;
Operations\CSharpOperationFactory.cs (1)
1229ImmutableArray<IOperation> elements = expr.Elements.SelectAsArray((element, expr) => CreateBoundCollectionExpressionElement(expr, element), expr);