122 references to ForEachStatement
Microsoft.CodeAnalysis.CSharp (16)
Binder\Binder_Statements.cs (2)
89case SyntaxKind.ForEachStatement: 361case SyntaxKind.ForEachStatement:
Binder\ForEachLoopBinder.cs (3)
40return (_syntax.Kind() == SyntaxKind.ForEachStatement) ? (SourceLocalSymbol)this.Locals[0] : null; 69case SyntaxKind.ForEachStatement: 257case SyntaxKind.ForEachStatement:
Compilation\CSharpSemanticModel.cs (1)
5106case SyntaxKind.ForEachStatement:
Compilation\MemberSemanticModel.cs (1)
404case SyntaxKind.ForEachStatement:
Lowering\ClosureConversion\ClosureConversion.cs (1)
1745case SyntaxKind.ForEachStatement:
Lowering\Instrumentation\DebugInfoInjector.cs (1)
271case SyntaxKind.ForEachStatement:
Lowering\Instrumentation\Instrumenter.cs (1)
158Debug.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 (15)
CSharpAddBracesDiagnosticAnalyzer.cs (1)
37SyntaxKind.ForEachStatement,
CSharpForEachCastDiagnosticAnalyzer.cs (1)
24=> ImmutableArray.Create(SyntaxKind.ForEachStatement, SyntaxKind.ForEachVariableStatement);
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
290case SyntaxKind.ForEachStatement:
CSharpNamingStyleDiagnosticAnalyzer.cs (1)
20SyntaxKind.ForEachStatement,
CSharpSyntaxKinds.cs (1)
130public int ForEachStatement => (int)SyntaxKind.ForEachStatement;
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
48HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
CSharpTypeStyleHelper.cs (2)
61if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 83Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
ForEachStatementSyntaxExtensions.cs (1)
17case SyntaxKind.ForEachStatement:
FormattingRangeHelper.cs (1)
361SyntaxKind.ForEachStatement or
NewLineUserSettingFormattingRule.cs (1)
57case SyntaxKind.ForEachStatement:
SpacingFormattingRule.cs (1)
611SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
SyntaxNodeExtensions.cs (2)
479case SyntaxKind.ForEachStatement: 494case SyntaxKind.ForEachStatement:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
102SyntaxKind.ForEachStatement or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
164parent.IsKind(SyntaxKind.ForEachStatement) ||
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
1793if (parent.Parent is (kind: SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement)) 2554SyntaxKind.ForEachStatement or
Microsoft.CodeAnalysis.CSharp.Features (36)
BraceCompletion\CurlyBraceCompletionService.cs (1)
220case SyntaxKind.ForEachStatement:
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (2)
46Debug.Assert(declaration.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression); 116(typeNodeParent.IsKind(SyntaxKind.ForEachStatement) && !syntaxFacts.IsExpressionOfForeach(typeNode))))
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
82case SyntaxKind.ForEachStatement: 251case SyntaxKind.ForEachStatement:
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
98case SyntaxKind.ForEachStatement:
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
237case SyntaxKind.ForEachStatement:
CSharpAddBracesDiagnosticAnalyzer.cs (1)
37SyntaxKind.ForEachStatement,
CSharpForEachCastDiagnosticAnalyzer.cs (1)
24=> ImmutableArray.Create(SyntaxKind.ForEachStatement, SyntaxKind.ForEachVariableStatement);
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
290case SyntaxKind.ForEachStatement:
CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
102SyntaxKind.ForEachStatement or
CSharpNamingStyleDiagnosticAnalyzer.cs (1)
20SyntaxKind.ForEachStatement,
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
48HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
39SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement);
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
206case SyntaxKind.ForEachStatement: 260case SyntaxKind.ForEachStatement:
EditAndContinue\BreakpointSpans.cs (3)
480case SyntaxKind.ForEachStatement: 493if (forEachStatement.Kind() == SyntaxKind.ForEachStatement) 766case SyntaxKind.ForEachStatement:
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (11)
388case SyntaxKind.ForEachStatement: 856case SyntaxKind.ForEachStatement: 938case SyntaxKind.ForEachStatement: 993case SyntaxKind.ForEachStatement: 1032case SyntaxKind.ForEachStatement: 1129case SyntaxKind.ForEachStatement: return AreEquivalentIgnoringLambdaBodies(((ForEachStatementSyntax)oldNode).Type, ((ForEachStatementSyntax)newNode).Type); 1789case SyntaxKind.ForEachStatement: 2121case SyntaxKind.ForEachStatement: 2224case SyntaxKind.ForEachStatement: 2804case SyntaxKind.ForEachStatement: 3060n => n.IsKind(SyntaxKind.ForEachStatement) || n.IsKind(SyntaxKind.ForEachVariableStatement),
EditAndContinue\SyntaxComparer.cs (4)
382case SyntaxKind.ForEachStatement: 782case SyntaxKind.ForEachStatement: 1047case SyntaxKind.ForEachStatement: 1295case SyntaxKind.ForEachStatement:
LambdaUtilities.cs (1)
396case SyntaxKind.ForEachStatement:
Structure\Providers\BlockSyntaxStructureProvider.cs (1)
136case SyntaxKind.ForEachStatement: return BlockTypes.Loop;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ForEachTests.cs (2)
3258(CommonForEachStatementSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.ForEachStatement).AsNode() ?? 3362var 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)
371N(SyntaxKind.ForEachStatement); 399N(SyntaxKind.ForEachStatement); 541N(SyntaxKind.ForEachStatement);
Parsing\DeclarationScopeParsingTests.cs (20)
9976N(SyntaxKind.ForEachStatement); 10010N(SyntaxKind.ForEachStatement); 10111N(SyntaxKind.ForEachStatement); 10311N(SyntaxKind.ForEachStatement); 10405N(SyntaxKind.ForEachStatement); 10510N(SyntaxKind.ForEachStatement); 10630N(SyntaxKind.ForEachStatement); 10668N(SyntaxKind.ForEachStatement); 10710N(SyntaxKind.ForEachStatement); 10753N(SyntaxKind.ForEachStatement); 10795N(SyntaxKind.ForEachStatement); 10833N(SyntaxKind.ForEachStatement); 10871N(SyntaxKind.ForEachStatement); 10913N(SyntaxKind.ForEachStatement); 10956N(SyntaxKind.ForEachStatement); 10990N(SyntaxKind.ForEachStatement); 11044N(SyntaxKind.ForEachStatement); 11098N(SyntaxKind.ForEachStatement); 11156N(SyntaxKind.ForEachStatement); 11298N(SyntaxKind.ForEachStatement);
Parsing\FunctionPointerTests.cs (1)
2946N(SyntaxKind.ForEachStatement);
Parsing\StatementAttributeParsingTests.cs (1)
1142N(SyntaxKind.ForEachStatement);
Parsing\StatementParsingTests.cs (4)
1925Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 1954Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 1987Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind()); 3370Assert.Equal(SyntaxKind.ForEachStatement, statement.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (14)
Classification\ClassificationHelpers.cs (1)
118case SyntaxKind.ForEachStatement:
CSharpSyntaxKinds.cs (1)
130public int ForEachStatement => (int)SyntaxKind.ForEachStatement;
CSharpTypeStyleHelper.cs (2)
61if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 83Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
ForEachStatementSyntaxExtensions.cs (1)
17case SyntaxKind.ForEachStatement:
FormattingRangeHelper.cs (1)
361SyntaxKind.ForEachStatement or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (2)
479case SyntaxKind.ForEachStatement: 494case SyntaxKind.ForEachStatement:
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
164parent.IsKind(SyntaxKind.ForEachStatement) ||
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
1793if (parent.Parent is (kind: SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement)) 2554SyntaxKind.ForEachStatement or
NewLineUserSettingFormattingRule.cs (1)
57case SyntaxKind.ForEachStatement:
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
187case SyntaxKind.ForEachStatement:
SpacingFormattingRule.cs (1)
611SyntaxKind.ForStatement or SyntaxKind.ForEachStatement or SyntaxKind.ForEachVariableStatement or
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1167case CSharp.SyntaxKind.ForEachStatement: