3 instantiations of BoundForEachStatement
Microsoft.CodeAnalysis.CSharp (3)
Binder\ForEachLoopBinder.cs (2)
414return new BoundForEachStatement( 574return new BoundForEachStatement(
Generated\BoundNodes.xml.Generated.cs (1)
3966var result = new BoundForEachStatement(this.Syntax, enumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, iterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, awaitOpt, body, breakLabel, continueLabel, this.HasErrors);
119 references to BoundForEachStatement
Microsoft.CodeAnalysis.CSharp (66)
Binder\ForEachLoopBinder.cs (2)
166BoundForEachStatement result = BindForEachPartsWorker(diagnostics, originalBinder); 201private BoundForEachStatement BindForEachPartsWorker(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\RefSafetyAnalysis.cs (1)
854public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
BoundTree\BoundNode.cs (1)
600public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
BoundTree\BoundTreeVisitors.cs (1)
94return VisitForEachStatement(node as BoundForEachStatement, arg);
Compilation\MemberSemanticModel.cs (4)
933BoundForEachStatement boundForEach = (BoundForEachStatement)GetUpperBoundNode(node); 1008var boundForEach = (BoundForEachStatement)GetUpperBoundNode(node);
FlowAnalysis\AbstractFlowPass.cs (3)
2674public override BoundNode VisitForEachStatement(BoundForEachStatement node) 2694protected virtual void VisitForEachExpression(BoundForEachStatement node) 2699public virtual void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\DefiniteAssignment.cs (3)
437var foreachStatement = (BoundForEachStatement)pendingBranch; 2594public override void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\ExitPointsWalker.cs (2)
86public override BoundNode VisitForEachStatement(BoundForEachStatement node) 143case BoundKind.ForEachStatement when ((BoundForEachStatement)pending.Branch).AwaitOpt != null:
FlowAnalysis\NullableWalker.cs (4)
3213public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 6077if (node is BoundForEachStatement { EnumeratorInfoOpt: { GetEnumeratorInfo: { Method: { TypeArgumentsWithAnnotations: { IsEmpty: false } } } } }) 9952protected override void VisitForEachExpression(BoundForEachStatement node) 10148public override void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
133public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
126public override void VisitForEachIterationVariables(BoundForEachStatement node)
Generated\BoundNodes.xml.Generated.cs (9)
3962public BoundForEachStatement Update(ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundAwaitableInfo? awaitOpt, BoundStatement body, GeneratedLabelSymbol breakLabel, GeneratedLabelSymbol continueLabel) 3966var result = new BoundForEachStatement(this.Syntax, enumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, iterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, awaitOpt, body, breakLabel, continueLabel, this.HasErrors); 8717return VisitForEachStatement((BoundForEachStatement)node, arg); 9071public virtual R VisitForEachStatement(BoundForEachStatement node, A arg) => this.DefaultVisit(node, arg); 9299public virtual BoundNode? VisitForEachStatement(BoundForEachStatement node) => this.DefaultVisit(node); 9819public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 10992public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 12962public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 15310public override TreeDumperNode VisitForEachStatement(BoundForEachStatement node, object? arg) => new TreeDumperNode("forEachStatement", null, new TreeDumperNode[]
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (3)
364public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 369public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 536syntaxForSpan = ((BoundForEachStatement)statement).Expression.Syntax;
Lowering\Instrumentation\CompoundInstrumenter.cs (5)
102public override BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 107public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 112public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 122public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack) 241public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl)
Lowering\Instrumentation\DebugInfoInjector.cs (5)
224public override BoundStatement InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 231public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 245public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 266public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 298public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack)
Lowering\Instrumentation\Instrumenter.cs (5)
142public virtual BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 149public virtual BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 155public virtual BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 162public virtual BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 169public virtual BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (10)
29public override BoundNode VisitForEachStatement(BoundForEachStatement node) 105private BoundStatement RewriteEnumeratorForEachStatement(BoundForEachStatement node) 521private BoundStatement RewriteForEachStatementAsFor(BoundForEachStatement node, MethodSymbol indexerGet, MethodSymbol lengthGet) 632BoundForEachStatement forEachBound, 698private BoundStatement RewriteSingleDimensionalArrayForEachStatement(BoundForEachStatement node) 823private BoundStatement RewriteMultiDimensionalArrayForEachStatement(BoundForEachStatement node) 1000private static BoundExpression GetUnconvertedCollectionExpression(BoundForEachStatement node, out Conversion collectionConversion) 1050private void InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, [NotNullIfNotNull(nameof(collectionVarDecl))] ref BoundStatement? collectionVarDecl) 1058private void InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, ref BoundStatement iterationVarDecl) 1074private void InstrumentForEachStatement(BoundForEachStatement original, ref BoundStatement result)
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (1)
150branchBack = Instrumenter.InstrumentForEachStatementConditionalGotoStart((BoundForEachStatement)original, branchBack);
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (1)
79ifConditionGotoStart = Instrumenter.InstrumentForEachStatementConditionalGotoStart((BoundForEachStatement)loop, ifConditionGotoStart);
Operations\CSharpOperationFactory.cs (4)
179return CreateBoundForEachStatementOperation((BoundForEachStatement)boundNode); 1780internal ForEachLoopOperationInfo? GetForEachLoopOperatorInfo(BoundForEachStatement boundForEachStatement) 1846internal IOperation CreateBoundForEachStatementLoopControlVariable(BoundForEachStatement boundForEachStatement) 1866private IForEachLoopOperation CreateBoundForEachStatementOperation(BoundForEachStatement boundForEachStatement)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (24)
CodeGen\CodeGenAwaitForeachTests.cs (24)
1673BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2130var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2449BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2507var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2697BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2745var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 2878var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 3626var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 3699var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 3809var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 4135var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 4216var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\ForEachTests.cs (27)
1202var boundNode = GetBoundForEachStatement(text); 1223private static Conversion GetCollectionConversion(BoundForEachStatement boundNode) 1240var boundNode = GetBoundForEachStatement(text); 1284var boundNode = GetBoundForEachStatement(text); 1328var boundNode = GetBoundForEachStatement(text); 1361var boundNode = GetBoundForEachStatement(text); 1401var boundNode = GetBoundForEachStatement(text); 1443var boundNode = GetBoundForEachStatement(text); 1482var boundNode = GetBoundForEachStatement(text); 1515var boundNode = GetBoundForEachStatement(text); 1546var boundNode = GetBoundForEachStatement(text); 1588var boundNode = GetBoundForEachStatement(text); 1612var boundNode = GetBoundForEachStatement(text); 1632var boundNode = GetBoundForEachStatement(text); 1663var boundNode = GetBoundForEachStatement(text); 1696var boundNode = GetBoundForEachStatement(text); 1737var boundNode = GetBoundForEachStatement(text); 1821var boundNode = GetBoundForEachStatement(text); 1867var boundNode = GetBoundForEachStatement(text); 1904var boundNode = GetBoundForEachStatement(text, TestOptions.Regular, 3112var boundNode = GetBoundForEachStatement(text); 3159var boundNode = GetBoundForEachStatement(text); 3194var boundNode = GetBoundForEachStatement(text, TestOptions.Regular7_3, 3230var boundNode = GetBoundForEachStatement(text, options: TestOptions.Regular9); 3250private static BoundForEachStatement GetBoundForEachStatement(string text, CSharpParseOptions options = null, params DiagnosticDescription[] diagnostics) 3263BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(syntaxNode);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\ConversionTests.cs (2)
1736var boundForEach = memberModel.GetBoundNodes(forEachSyntax).OfType<BoundForEachStatement>().Single();