Base:
property
Expression
Microsoft.CodeAnalysis.CSharp.Syntax.CommonForEachStatementSyntax.Expression
49 references to Expression
Microsoft.CodeAnalysis.CSharp (13)
_generated\0\Syntax.xml.Main.Generated.cs (1)
1906=> node.Update(VisitList(node.AttributeLists), VisitToken(node.AwaitKeyword), VisitToken(node.ForEachKeyword), VisitToken(node.OpenParenToken), (TypeSyntax?)Visit(node.Type) ?? throw new ArgumentNullException("type"), VisitToken(node.Identifier), VisitToken(node.InKeyword), (ExpressionSyntax?)Visit(node.Expression) ?? throw new ArgumentNullException("expression"), VisitToken(node.CloseParenToken), (StatementSyntax?)Visit(node.Statement) ?? throw new ArgumentNullException("statement"));
_generated\2\Syntax.xml.Syntax.Generated.cs (10)
7833if (attributeLists != this.AttributeLists || awaitKeyword != this.AwaitKeyword || forEachKeyword != this.ForEachKeyword || openParenToken != this.OpenParenToken || type != this.Type || identifier != this.Identifier || inKeyword != this.InKeyword || expression != this.Expression || closeParenToken != this.CloseParenToken || statement != this.Statement) 7844public new ForEachStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7846public new ForEachStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7848public new ForEachStatementSyntax WithForEachKeyword(SyntaxToken forEachKeyword) => Update(this.AttributeLists, this.AwaitKeyword, forEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7850public new ForEachStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, openParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7851public ForEachStatementSyntax WithType(TypeSyntax type) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7852public ForEachStatementSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, identifier, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement); 7854public new ForEachStatementSyntax WithInKeyword(SyntaxToken inKeyword) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, inKeyword, this.Expression, this.CloseParenToken, this.Statement); 7858public new ForEachStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, closeParenToken, this.Statement); 7860public new ForEachStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.Type, this.Identifier, this.InKeyword, this.Expression, this.CloseParenToken, statement);
Binder\ForEachLoopBinder.cs (1)
93syntax.Expression);
FlowAnalysis\NullableWalker.cs (1)
7588ForEachStatementSyntax { Expression: var expression } => expression,
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (1)
27expression = foreachStatement.Expression;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
184spreadElements.Add(foreachStatement.Expression);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
381foreachStatement.Expression == expression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1266=> node?.Parent is ForEachStatementSyntax foreachStatement && foreachStatement.Expression == node;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
100foreachStatement.Identifier, typeName, foreachStatement.Expression,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
538var indentedExpression = IndentNode(foreachStatement, foreachStatement.Expression, preferredIndentation); 847yield return foreachStatement.Expression;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
125forEachStatement.Expression,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1655if (@foreach.Expression == outer &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1327if (expressionOpt != null && expressionOpt != forEachStatementSyntax.Expression)
Microsoft.CodeAnalysis.CSharp.Features (15)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
64var foreachCollectionExpression = foreachStatement.Expression;
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (3)
113expression: forEachStatement.Expression) 133receiverForInvocation: foreachStatement.Expression, 252receiverForInvocation: foreachStatement.Expression,
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
617if (forEachStatement.Expression.WalkDownParentheses() != _source)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
65AddExpressionTerms(node.Expression, _expressions);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
329ForEachPart.Expression => node.Expression.Span,
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
219return node.WithExpression(VisitNode(node.Expression))
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
121arrayBuilder.Add(new SnippetPlaceholder(node.Expression.ToString(), node.Expression.SpanStart));
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (1)
27expression = foreachStatement.Expression;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
184spreadElements.Add(foreachStatement.Expression);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
538var indentedExpression = IndentNode(foreachStatement, foreachStatement.Expression, preferredIndentation); 847yield return foreachStatement.Expression;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseDeconstruction\CSharpUseDeconstructionCodeFixProvider.cs (1)
125forEachStatement.Expression,
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\CSharpAvoidMultipleEnumerationsAnalyzer.cs (1)
14=> syntax.Parent is ForEachStatementSyntax forEachStatementSyntax && forEachStatementSyntax.Expression.Equals(syntax);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
381foreachStatement.Expression == expression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1266=> node?.Parent is ForEachStatementSyntax foreachStatement && foreachStatement.Expression == node;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
100foreachStatement.Identifier, typeName, foreachStatement.Expression,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1655if (@foreach.Expression == outer &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1327if (expressionOpt != null && expressionOpt != forEachStatementSyntax.Expression)
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
381foreachStatement.Expression == expression)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1266=> node?.Parent is ForEachStatementSyntax foreachStatement && foreachStatement.Expression == node;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
100foreachStatement.Identifier, typeName, foreachStatement.Expression,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1655if (@foreach.Expression == outer &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1327if (expressionOpt != null && expressionOpt != forEachStatementSyntax.Expression)