108 references to ForEachStatement
Microsoft.CodeAnalysis.CSharp (16)
Binder\Binder_Statements.cs (2)
90case SyntaxKind.ForEachStatement: 364case SyntaxKind.ForEachStatement:
Binder\ForEachLoopBinder.cs (3)
33return (_syntax.Kind() == SyntaxKind.ForEachStatement) ? (SourceLocalSymbol)this.Locals[0] : null; 85case SyntaxKind.ForEachStatement: 272case SyntaxKind.ForEachStatement:
Compilation\CSharpSemanticModel.cs (1)
5131case SyntaxKind.ForEachStatement:
Compilation\MemberSemanticModel.cs (1)
414case SyntaxKind.ForEachStatement:
Lowering\ClosureConversion\ClosureConversion.cs (1)
1773case SyntaxKind.ForEachStatement:
Lowering\Instrumentation\DebugInfoInjector.cs (1)
316case SyntaxKind.ForEachStatement:
Lowering\Instrumentation\Instrumenter.cs (1)
159Debug.Assert(original.Syntax.Kind() == SyntaxKind.ForEachStatement);
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
120case SyntaxKind.ForEachStatement:
Syntax\LambdaUtilities.cs (1)
396case SyntaxKind.ForEachStatement:
Syntax\LookupPosition.cs (2)
333case SyntaxKind.ForEachStatement: 396case SyntaxKind.ForEachStatement:
Syntax\SyntaxFacts.cs (1)
131case ForEachStatement:
Syntax\SyntaxNodeExtensions.cs (1)
130case SyntaxKind.ForEachStatement:
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
37SyntaxKind.ForEachStatement,
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
24=> [SyntaxKind.ForEachStatement, SyntaxKind.ForEachVariableStatement];
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
325case SyntaxKind.ForEachStatement:
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
20SyntaxKind.ForEachStatement,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
30HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
401case SyntaxKind.ForEachStatement: 416case SyntaxKind.ForEachStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
57case SyntaxKind.ForEachStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
614SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
146public int ForEachStatement => (int)SyntaxKind.ForEachStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
360SyntaxKind.ForEachStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
62if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 84Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
99SyntaxKind.ForEachStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
165or SyntaxKind.ForEachStatement
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1809if (parent.Parent is (kind: SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement)) 2549SyntaxKind.ForEachStatement or
Microsoft.CodeAnalysis.CSharp.Features (24)
BraceCompletion\CurlyBraceCompletionService.cs (1)
214case SyntaxKind.ForEachStatement:
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
41Debug.Assert(declaration.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
82case SyntaxKind.ForEachStatement: 250case SyntaxKind.ForEachStatement:
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
98case SyntaxKind.ForEachStatement:
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
231case SyntaxKind.ForEachStatement:
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
200case SyntaxKind.ForEachStatement: 254case SyntaxKind.ForEachStatement:
EditAndContinue\BreakpointSpans.cs (3)
661case SyntaxKind.ForEachStatement: 674if (forEachStatement.Kind() == SyntaxKind.ForEachStatement) 964case SyntaxKind.ForEachStatement:
EditAndContinue\SyntaxComparer.cs (4)
383case SyntaxKind.ForEachStatement: 791case SyntaxKind.ForEachStatement: 1056case SyntaxKind.ForEachStatement: 1304case SyntaxKind.ForEachStatement:
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
37SyntaxKind.ForEachStatement,
src\Analyzers\CSharp\Analyzers\ForEachCast\CSharpForEachCastDiagnosticAnalyzer.cs (1)
24=> [SyntaxKind.ForEachStatement, SyntaxKind.ForEachVariableStatement];
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
325case SyntaxKind.ForEachStatement:
src\Analyzers\CSharp\Analyzers\NamingStyle\CSharpNamingStyleDiagnosticAnalyzer.cs (1)
20SyntaxKind.ForEachStatement,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
30HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
99SyntaxKind.ForEachStatement or
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
396case SyntaxKind.ForEachStatement:
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
203SyntaxKind.ForEachStatement => BlockTypes.Loop,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ForEachTests.cs (2)
3259(CommonForEachStatementSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.ForEachStatement).AsNode() ?? 3421var node = tree.GetRoot().DescendantNodes().Where(n => n.Kind() == SyntaxKind.ForEachStatement).OfType<ForEachStatementSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (4)
3478Assert.Equal(SyntaxKind.ForEachStatement, foreachNode.Kind()); 3502Assert.Equal(SyntaxKind.ForEachStatement, foreachNode.Kind()); 3529Assert.Equal(SyntaxKind.ForEachStatement, foreachNode1.Kind()); 3535Assert.Equal(SyntaxKind.ForEachStatement, foreachNode2.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (30)
Parsing\AsyncStreamsParsingTests.cs (1)
310N(SyntaxKind.ForEachStatement);
Parsing\DeclarationExpressionTests.cs (3)
408N(SyntaxKind.ForEachStatement); 436N(SyntaxKind.ForEachStatement); 578N(SyntaxKind.ForEachStatement);
Parsing\DeclarationScopeParsingTests.cs (20)
9663N(SyntaxKind.ForEachStatement); 9697N(SyntaxKind.ForEachStatement); 9798N(SyntaxKind.ForEachStatement); 9984N(SyntaxKind.ForEachStatement); 10078N(SyntaxKind.ForEachStatement); 10183N(SyntaxKind.ForEachStatement); 10296N(SyntaxKind.ForEachStatement); 10334N(SyntaxKind.ForEachStatement); 10376N(SyntaxKind.ForEachStatement); 10419N(SyntaxKind.ForEachStatement); 10461N(SyntaxKind.ForEachStatement); 10499N(SyntaxKind.ForEachStatement); 10537N(SyntaxKind.ForEachStatement); 10579N(SyntaxKind.ForEachStatement); 10622N(SyntaxKind.ForEachStatement); 10656N(SyntaxKind.ForEachStatement); 10710N(SyntaxKind.ForEachStatement); 10764N(SyntaxKind.ForEachStatement); 10822N(SyntaxKind.ForEachStatement); 10964N(SyntaxKind.ForEachStatement);
Parsing\FunctionPointerTests.cs (1)
2946N(SyntaxKind.ForEachStatement);
Parsing\StatementAttributeParsingTests.cs (1)
1143N(SyntaxKind.ForEachStatement);
Parsing\StatementParsingTests.cs (4)
1925Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 1954Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 1987Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 3373Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
Classification\ClassificationHelpers.cs (1)
105case SyntaxKind.ForEachStatement:
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
185case SyntaxKind.ForEachStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
401case SyntaxKind.ForEachStatement: 416case SyntaxKind.ForEachStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (1)
57case SyntaxKind.ForEachStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (1)
614SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
146public int ForEachStatement => (int)SyntaxKind.ForEachStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
360SyntaxKind.ForEachStatement or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
62if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 84Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
165or SyntaxKind.ForEachStatement
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
1809if (parent.Parent is (kind: SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement)) 2549SyntaxKind.ForEachStatement or
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1135case CSharp.SyntaxKind.ForEachStatement: