1 implementation of LoopControlVariable
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4208public IOperation LoopControlVariable { get; }
22 references to LoopControlVariable
Microsoft.CodeAnalysis (11)
Operations\ControlFlowGraphBuilder.cs (11)
4464if (!operation.Locals.IsEmpty && operation.LoopControlVariable.Kind == OperationKind.VariableDeclarator) 4475var declarator = (IVariableDeclaratorOperation)operation.LoopControlVariable; 4644operation.LoopControlVariable.Syntax, 4656switch (operation.LoopControlVariable.Kind) 4659var declarator = (IVariableDeclaratorOperation)operation.LoopControlVariable; 4682return new DeconstructionAssignmentOperation(VisitPreservingTupleOperations(operation.LoopControlVariable), 4684operation.LoopControlVariable.Syntax, operation.LoopControlVariable.Type, 4688VisitRequired(operation.LoopControlVariable), 4689current, semanticModel: null, operation.LoopControlVariable.Syntax, 4690operation.LoopControlVariable.Type,
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
67if (loopOperation.LoopControlVariable is not IVariableDeclaratorOperation variableDeclarator ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
272operation.Parent is IForEachLoopOperation forEachLoop && forEachLoop.LoopControlVariable == operation ||
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
66var variableDeclarator = (IVariableDeclaratorOperation)loopOperation.LoopControlVariable;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
149IForEachLoopOperation { LoopControlVariable: IVariableDeclaratorOperation variableDeclarator } => variableDeclarator.Symbol.Equals(symbol),
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
67if (loopOperation.LoopControlVariable is not IVariableDeclaratorOperation variableDeclarator ||
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
66var variableDeclarator = (IVariableDeclaratorOperation)loopOperation.LoopControlVariable;
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\OperationTreeVerifier.cs (2)
653Assert.NotNull(operation.LoopControlVariable); 654Visit(operation.LoopControlVariable, "LoopControlVariable");
Compilation\TestOperationVisitor.cs (1)
334IEnumerable<IOperation> children = new[] { operation.Collection, operation.LoopControlVariable, operation.Body }.Concat(operation.NextVariables);
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
272operation.Parent is IForEachLoopOperation forEachLoop && forEachLoop.LoopControlVariable == operation ||
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
149IForEachLoopOperation { LoopControlVariable: IVariableDeclaratorOperation variableDeclarator } => variableDeclarator.Symbol.Equals(symbol),