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