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