3 instantiations of BoundForEachStatement
Microsoft.CodeAnalysis.CSharp (3)
Binder\ForEachLoopBinder.cs (2)
446return new BoundForEachStatement( 595return new BoundForEachStatement(
Generated\BoundNodes.xml.Generated.cs (1)
4079var result = new BoundForEachStatement(this.Syntax, enumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, iterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, body, breakLabel, continueLabel, this.HasErrors);
119 references to BoundForEachStatement
Microsoft.CodeAnalysis.CSharp (66)
Binder\ForEachLoopBinder.cs (2)
182BoundForEachStatement result = BindForEachPartsWorker(diagnostics, originalBinder); 216private BoundForEachStatement BindForEachPartsWorker(BindingDiagnosticBag diagnostics, Binder originalBinder)
Binder\RefSafetyAnalysis.cs (1)
1255public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
BoundTree\BoundNode.cs (1)
662public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
BoundTree\BoundTreeVisitors.cs (1)
94return VisitForEachStatement(node as BoundForEachStatement, arg);
Compilation\MemberSemanticModel.cs (4)
976BoundForEachStatement boundForEach = (BoundForEachStatement)GetUpperBoundNode(node); 1056var boundForEach = (BoundForEachStatement)GetUpperBoundNode(node);
FlowAnalysis\AbstractFlowPass.cs (3)
2898public override BoundNode VisitForEachStatement(BoundForEachStatement node) 2918protected virtual void VisitForEachExpression(BoundForEachStatement node) 2923public virtual void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\DefiniteAssignment.cs (1)
2720public override void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\ExitPointsWalker.cs (2)
86public override BoundNode VisitForEachStatement(BoundForEachStatement node) 143case BoundKind.ForEachStatement when ((BoundForEachStatement)pending.Branch).EnumeratorInfoOpt is { MoveNextAwaitableInfo: not null }:
FlowAnalysis\NullableWalker.cs (4)
3591public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 7198or BoundForEachStatement 11677protected override void VisitForEachExpression(BoundForEachStatement node) 11911public override void VisitForEachIterationVariables(BoundForEachStatement node)
FlowAnalysis\NullableWalker.DebugVerifier.cs (1)
214public override BoundNode? VisitForEachStatement(BoundForEachStatement node)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
127public override void VisitForEachIterationVariables(BoundForEachStatement node)
Generated\BoundNodes.xml.Generated.cs (9)
4075public BoundForEachStatement Update(ForEachEnumeratorInfo? enumeratorInfoOpt, BoundValuePlaceholder? elementPlaceholder, BoundExpression? elementConversion, BoundTypeExpression iterationVariableType, ImmutableArray<LocalSymbol> iterationVariables, BoundExpression? iterationErrorExpressionOpt, BoundExpression expression, BoundForEachDeconstructStep? deconstructionOpt, BoundStatement body, LabelSymbol breakLabel, LabelSymbol continueLabel) 4079var result = new BoundForEachStatement(this.Syntax, enumeratorInfoOpt, elementPlaceholder, elementConversion, iterationVariableType, iterationVariables, iterationErrorExpressionOpt, expression, deconstructionOpt, body, breakLabel, continueLabel, this.HasErrors); 9083return VisitForEachStatement((BoundForEachStatement)node, arg); 9450public virtual R VisitForEachStatement(BoundForEachStatement node, A arg) => this.DefaultVisit(node, arg); 9686public virtual BoundNode? VisitForEachStatement(BoundForEachStatement node) => this.DefaultVisit(node); 10220public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 11501public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 13608public override BoundNode? VisitForEachStatement(BoundForEachStatement node) 16042public 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)
104public override BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 109public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 114public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 124public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack) 252public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl)
Lowering\Instrumentation\DebugInfoInjector.cs (5)
269public override BoundStatement InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 276public override BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 290public override BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 311public override BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 343public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack)
Lowering\Instrumentation\Instrumenter.cs (5)
143public virtual BoundStatement? InstrumentForEachStatementCollectionVarDeclaration(BoundForEachStatement original, BoundStatement? collectionVarDecl) 150public virtual BoundStatement InstrumentForEachStatement(BoundForEachStatement original, BoundStatement rewritten) 156public virtual BoundStatement InstrumentForEachStatementIterationVarDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 163public virtual BoundStatement InstrumentForEachStatementDeconstructionVariablesDeclaration(BoundForEachStatement original, BoundStatement iterationVarDecl) 170public virtual BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack)
Lowering\Instrumentation\ModuleCancellationInstrumenter.cs (1)
112public override BoundStatement InstrumentForEachStatementConditionalGotoStart(BoundForEachStatement original, BoundStatement branchBack)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (11)
34public override BoundNode VisitForEachStatement(BoundForEachStatement node) 119private BoundStatement RewriteEnumeratorForEachStatement(BoundForEachStatement node) 559private BoundStatement RewriteForEachStatementAsFor<TArg>(BoundForEachStatement node, GetForEachStatementAsForPreamble? getPreamble, GetForEachStatementAsForItem<TArg> getItem, GetForEachStatementAsForLength<TArg> getLength, TArg arg) 702private BoundStatement RewriteForEachStatementAsFor(BoundForEachStatement node, MethodSymbol indexerGet, MethodSymbol lengthGet) 726private BoundStatement RewriteInlineArrayForEachStatementAsFor(BoundForEachStatement node) 865private BoundStatement RewriteSingleDimensionalArrayForEachStatement(BoundForEachStatement node) 1014private BoundStatement RewriteMultiDimensionalArrayForEachStatement(BoundForEachStatement node) 1216private static BoundExpression GetUnconvertedCollectionExpression(BoundForEachStatement node, out Conversion collectionConversion) 1268if (this.Instrument && node is BoundForEachStatement original) 1276if (this.Instrument && node is BoundForEachStatement original) 1292if (this.Instrument && node is BoundForEachStatement original)
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (1)
149branchBack = Instrumenter.InstrumentForEachStatementConditionalGotoStart((BoundForEachStatement)original, branchBack);
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (1)
79ifConditionGotoStart = Instrumenter.InstrumentForEachStatementConditionalGotoStart((BoundForEachStatement)loop, ifConditionGotoStart);
Operations\CSharpOperationFactory.cs (4)
183return CreateBoundForEachStatementOperation((BoundForEachStatement)boundNode); 1887internal ForEachLoopOperationInfo? GetForEachLoopOperatorInfo(BoundForEachStatement boundForEachStatement) 1953internal IOperation CreateBoundForEachStatementLoopControlVariable(BoundForEachStatement boundForEachStatement) 1973private IForEachLoopOperation CreateBoundForEachStatementOperation(BoundForEachStatement boundForEachStatement)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (24)
CodeGen\CodeGenAwaitForeachTests.cs (24)
2480BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 4408var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 4892BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 5025var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 5221BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 5344var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 5478var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 6952var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 7108var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 7387var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 8072var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax); 8216var boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(foreachSyntax);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\ForEachTests.cs (27)
1719var boundNode = GetBoundForEachStatement(text); 1740private static Conversion GetCollectionConversion(BoundForEachStatement boundNode) 1757var boundNode = GetBoundForEachStatement(text); 1801var boundNode = GetBoundForEachStatement(text); 1845var boundNode = GetBoundForEachStatement(text); 1878var boundNode = GetBoundForEachStatement(text); 1918var boundNode = GetBoundForEachStatement(text); 1960var boundNode = GetBoundForEachStatement(text); 1999var boundNode = GetBoundForEachStatement(text); 2032var boundNode = GetBoundForEachStatement(text); 2063var boundNode = GetBoundForEachStatement(text); 2105var boundNode = GetBoundForEachStatement(text); 2129var boundNode = GetBoundForEachStatement(text); 2149var boundNode = GetBoundForEachStatement(text); 2180var boundNode = GetBoundForEachStatement(text); 2213var boundNode = GetBoundForEachStatement(text); 2254var boundNode = GetBoundForEachStatement(text); 2338var boundNode = GetBoundForEachStatement(text); 2384var boundNode = GetBoundForEachStatement(text); 2421var boundNode = GetBoundForEachStatement(text, TestOptions.Regular, 3629var boundNode = GetBoundForEachStatement(text); 3676var boundNode = GetBoundForEachStatement(text); 3711var boundNode = GetBoundForEachStatement(text, TestOptions.Regular7_3, 3747var boundNode = GetBoundForEachStatement(text, options: TestOptions.Regular9); 3767private static BoundForEachStatement GetBoundForEachStatement(string text, CSharpParseOptions options = null, params DiagnosticDescription[] diagnostics) 3780BoundForEachStatement boundNode = (BoundForEachStatement)memberModel.GetUpperBoundNode(syntaxNode);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\ConversionTests.cs (2)
2079var boundForEach = memberModel.GetBoundNodes(forEachSyntax).ToArray().OfType<BoundForEachStatement>().Single();