46 references to Variable
Microsoft.CodeAnalysis.CSharp (20)
_generated\0\Syntax.xml.Main.Generated.cs (1)
1909
=> node.Update(VisitList(node.AttributeLists), VisitToken(node.AwaitKeyword), VisitToken(node.ForEachKeyword), VisitToken(node.OpenParenToken), (ExpressionSyntax?)Visit(node.
Variable
) ?? throw new ArgumentNullException("variable"), 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 (9)
7940
if (attributeLists != this.AttributeLists || awaitKeyword != this.AwaitKeyword || forEachKeyword != this.ForEachKeyword || openParenToken != this.OpenParenToken || variable != this.
Variable
|| inKeyword != this.InKeyword || expression != this.Expression || closeParenToken != this.CloseParenToken || statement != this.Statement)
7951
public new ForEachVariableStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement);
7953
public new ForEachVariableStatementSyntax WithAwaitKeyword(SyntaxToken awaitKeyword) => Update(this.AttributeLists, awaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement);
7955
public new ForEachVariableStatementSyntax WithForEachKeyword(SyntaxToken forEachKeyword) => Update(this.AttributeLists, this.AwaitKeyword, forEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement);
7957
public new ForEachVariableStatementSyntax WithOpenParenToken(SyntaxToken openParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, openParenToken, this.
Variable
, this.InKeyword, this.Expression, this.CloseParenToken, this.Statement);
7960
public new ForEachVariableStatementSyntax WithInKeyword(SyntaxToken inKeyword) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, inKeyword, this.Expression, this.CloseParenToken, this.Statement);
7962
public new ForEachVariableStatementSyntax WithExpression(ExpressionSyntax expression) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, expression, this.CloseParenToken, this.Statement);
7964
public new ForEachVariableStatementSyntax WithCloseParenToken(SyntaxToken closeParenToken) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, this.Expression, closeParenToken, this.Statement);
7966
public new ForEachVariableStatementSyntax WithStatement(StatementSyntax statement) => Update(this.AttributeLists, this.AwaitKeyword, this.ForEachKeyword, this.OpenParenToken, this.
Variable
, this.InKeyword, this.Expression, this.CloseParenToken, statement);
Binder\ForEachLoopBinder.cs (4)
79
syntax.
Variable
,
197
ExpressionSyntax variables = ((ForEachVariableStatementSyntax)_syntax).
Variable
;
382
var variables = node.
Variable
;
409
iterationErrorExpression = BindToTypeForErrorRecovery(BindExpression(node.
Variable
, BindingDiagnosticBag.Discarded));
Binder\LocalBinderFactory.cs (2)
651
if (node is ForEachVariableStatementSyntax forEachVariable && !forEachVariable.
Variable
.IsDeconstructionLeft())
654
Visit(forEachVariable.
Variable
, binder);
FlowAnalysis\NullableWalker.cs (1)
12521
ForEachVariableStatementSyntax variableStatement => variableStatement.
Variable
.GetLocation(),
Lowering\Instrumentation\DebugInfoInjector.cs (2)
279
return new BoundSequencePointWithSpan(forEachSyntax, base.InstrumentForEachStatementDeconstructionVariablesDeclaration(original, iterationVarDecl), forEachSyntax.
Variable
.Span);
325
iterationVarDeclSpan = forEachSyntax.
Variable
.Span;
Syntax\SyntaxExtensions.cs (1)
373
if ((object)((ForEachVariableStatementSyntax)parent).
Variable
== expr)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
306
if (((ForEachVariableStatementSyntax)parent).
Variable
== expr)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
845
(current is ForEachVariableStatementSyntax @foreach && previous == @foreach.
Variable
))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
232
ForEachVariableStatementSyntax @foreach => @foreach.
Variable
.GetLocation(),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
658
ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression } => declarationExpression.Type.IsTypeInferred(semanticModel),
900
else if (forEach is ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression })
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
64
target = @foreach.
Variable
;
Microsoft.CodeAnalysis.CSharp.Features (10)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
486
f is ForEachVariableStatementSyntax forEachVariableStatement ? forEachVariableStatement.
Variable
:
Completion\KeywordRecommenders\InKeywordRecommender.cs (1)
69
if (statement != null && token.Span.End == statement.
Variable
.Span.End)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
70
AddVariableExpressions(node.
Variable
, _expressions);
EditAndContinue\BreakpointSpans.cs (1)
682
return ((ForEachVariableStatementSyntax)statement).
Variable
.Span;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
337
ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.
Variable
.SpanStart, node.
Variable
.Span.End),
883
case SyntaxKind.ForEachVariableStatement: return AreEquivalentIgnoringLambdaBodies(((ForEachVariableStatementSyntax)oldNode).
Variable
, ((ForEachVariableStatementSyntax)newNode).
Variable
);
EditAndContinue\SyntaxComparer.cs (1)
1319
GetLocalNames(forEachVariable.
Variable
, ref result);
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
64
target = @foreach.
Variable
;
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
306
if (((ForEachVariableStatementSyntax)parent).
Variable
== expr)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
845
(current is ForEachVariableStatementSyntax @foreach && previous == @foreach.
Variable
))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
232
ForEachVariableStatementSyntax @foreach => @foreach.
Variable
.GetLocation(),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
658
ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression } => declarationExpression.Type.IsTypeInferred(semanticModel),
900
else if (forEach is ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression })
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
306
if (((ForEachVariableStatementSyntax)parent).
Variable
== expr)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
845
(current is ForEachVariableStatementSyntax @foreach && previous == @foreach.
Variable
))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
232
ForEachVariableStatementSyntax @foreach => @foreach.
Variable
.GetLocation(),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
658
ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression } => declarationExpression.Type.IsTypeInferred(semanticModel),
900
else if (forEach is ForEachVariableStatementSyntax {
Variable
: DeclarationExpressionSyntax declarationExpression })