41 references to ControlVariable
Microsoft.CodeAnalysis.VisualBasic (12)
Binding\Binder_Statements.vb (2)
2885DirectCast(node.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable, 3378controlVariableOpt = New BoundLocal(forEachStatement.ControlVariable, declaredOrInferredLocalOpt, type)
Binding\ForOrForEachBlockBinder.vb (1)
49controlVariableSyntax = DirectCast(_syntax.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable
Generated\Syntax.xml.Main.Generated.vb (2)
3523Dim newControlVariable = DirectCast(Visit(node.ControlVariable), VisualBasicSyntaxNode) 3524If node.ControlVariable IsNot newControlVariable Then anyChanges = True
Generated\Syntax.xml.Syntax.Generated.vb (7)
19504return Update(forKeyword, Me.EachKeyword, Me.ControlVariable, Me.InKeyword, Me.Expression) 19522return Update(Me.ForKeyword, eachKeyword, Me.ControlVariable, Me.InKeyword, Me.Expression) 19538Return Me.ControlVariable 19569return Update(Me.ForKeyword, Me.EachKeyword, Me.ControlVariable, inKeyword, Me.Expression) 19587return Update(Me.ForKeyword, Me.EachKeyword, Me.ControlVariable, Me.InKeyword, expression) 19604Return Me.ControlVariable 19641If forKeyword <> Me.ForKeyword OrElse eachKeyword <> Me.EachKeyword OrElse controlVariable IsNot Me.ControlVariable OrElse inKeyword <> Me.InKeyword OrElse expression IsNot Me.Expression Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
CastAnalyzer.vb (1)
87Dim returnedType = AsTypeInVariableDeclarator(parentForEach.ControlVariable, semanticModel)
SpeculationAnalyzer.vb (1)
445Dim forEachControlVariable = TryCast(forEachStatement.ControlVariable, VariableDeclaratorSyntax)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
VisualBasicTypeInferenceService.TypeInferrer.vb (3)
655If TypeOf forEachStatement.ControlVariable Is VariableDeclaratorSyntax Then 656Dim declarator = DirectCast(forEachStatement.ControlVariable, VariableDeclaratorSyntax) 663ElseIf TypeOf forEachStatement.ControlVariable Is SimpleNameSyntax Then
Microsoft.CodeAnalysis.VisualBasic.Features (9)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
99controlVariable = forEachStatement.ControlVariable
Completion\KeywordRecommenders\Declarations\AsKeywordRecommender.vb (1)
49If targetToken.IsFromIdentifierNode(Of ForEachStatementSyntax)(Function(forEachStatement) forEachStatement.ControlVariable) Then
Completion\KeywordRecommenders\Declarations\InKeywordRecommender.vb (2)
27Dim variableDeclarator = TryCast(forEachStatement.ControlVariable, VariableDeclaratorSyntax) 38If targetToken.IsFromIdentifierNode(Of ForEachStatementSyntax)(Function(forEachStatement) forEachStatement.ControlVariable) OrElse
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
155Dim controlVariable = forEachStatement.ControlVariable
EditAndContinue\SyntaxComparer.vb (2)
988distance = ComputeWeightedDistance(leftStatement.ControlVariable, 991rightStatement.ControlVariable,
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (2)
2824areSimilar:=Function(n1, n2) AreEquivalentIgnoringLambdaBodies(DirectCast(n1.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable, 2825DirectCast(n2.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Binding\ForEachTests.vb (1)
4529Dim variableSyntax = foreachSyntax.ControlVariable
Compilation\SemanticModelAPITests.vb (1)
78ctrlvar = TryCast(foreach.ControlVariable, ExpressionSyntax)
Semantics\ForeachTest.vb (4)
1171Dim typeInfo = model.GetTypeInfo(DirectCast(loopSyntax.ControlVariable, IdentifierNameSyntax)) 1174Dim conv = model.GetConversion(loopSyntax.ControlVariable) 1211Dim typeInfo = model.GetTypeInfo(DirectCast(loopSyntax.ControlVariable, IdentifierNameSyntax)) 1214Dim conv = model.GetConversion(loopSyntax.ControlVariable)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Generated\Syntax.Test.xml.Generated.vb (2)
20123Assert.NotNull(objectUnderTest.controlVariable) 20126Dim withObj = objectUnderTest.WithForKeyword(objectUnderTest.ForKeyword).WithEachKeyword(objectUnderTest.EachKeyword).WithControlVariable(objectUnderTest.ControlVariable).WithInKeyword(objectUnderTest.InKeyword).WithExpression(objectUnderTest.Expression)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
CastAnalyzer.vb (1)
87Dim returnedType = AsTypeInVariableDeclarator(parentForEach.ControlVariable, semanticModel)
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (1)
103name.CheckParent(Of ForEachStatementSyntax)(Function(p) p.ControlVariable Is name) OrElse
Rename\LocalConflictVisitor.vb (1)
141controlVariable = DirectCast(node.ForOrForEachStatement, ForEachStatementSyntax).ControlVariable
SpeculationAnalyzer.vb (1)
445Dim forEachControlVariable = TryCast(forEachStatement.ControlVariable, VariableDeclaratorSyntax)
VisualBasicTypeInferenceService.TypeInferrer.vb (3)
655If TypeOf forEachStatement.ControlVariable Is VariableDeclaratorSyntax Then 656Dim declarator = DirectCast(forEachStatement.ControlVariable, VariableDeclaratorSyntax) 663ElseIf TypeOf forEachStatement.ControlVariable Is SimpleNameSyntax Then