1 implementation of Local
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5302public ILocalSymbol Local { get; }
66 references to Local
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
108ILocalReferenceOperation l => l.Local.Type,
ILLink.RoslynAnalyzer (3)
DataFlow\LocalDataFlowVisitor.cs (3)
200 var local = localReference.Local; 211 var local = new LocalKey (operation.Local); 224 var local = new LocalKey (operation.Local);
Microsoft.Analyzers.Extra (2)
AsyncCallInsideUsingBlockAnalyzer.cs (2)
108return assignmentTarget != null && IsTaskAwaited(block, assignmentTarget.Local); 194return SymbolEqualityComparer.Default.Equals(localReference.Local, symbol);
Microsoft.AspNetCore.App.Analyzers (5)
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
79var localVariableDeclaration = localReferenceOperation.Local.DeclaringSyntaxReferences.FirstOrDefault();
RouteHandlers\DetectAmbiguousRoutes.cs (4)
185return SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local); 244if (!SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local))
Microsoft.CodeAnalysis (3)
Operations\ControlFlowGraphBuilder.cs (3)
862!((ILocalReferenceOperation)value).Local.IsFunctionValue) 4480if (op is ILocalReferenceOperation l && l.Local.Equals(local)) 7114return new LocalReferenceOperation(operation.Local, operation.IsDeclaration, semanticModel: null, operation.Syntax,
Microsoft.CodeAnalysis.CodeStyle (7)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
225=> Unwrap(value) is ILocalReferenceOperation localReference && accumulatorVariable.Equals(localReference.Local);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
106symbolsDeclaredInConditional.AddIfNotNull(localReference.Local); 125if (operation is ILocalReferenceOperation { Local: var local } &&
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
250localOrParameter = localReference.Local;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (3)
247if (operation.Local.IsRef) 254OnReferenceFound(operation.Local, operation); 476_currentAnalysisData.SetTargetsFromSymbolForDelegate(write, localReference.Local);
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (4)
167local = trueLocal.Local; 176if (local != null && !Equals(local, falseLocal.Local)) 179local = falseLocal.Local; 250Equals(variable, localReference.Local))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
145ILocalReferenceOperation localReference => localReference.Local.Equals(symbol),
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
521if (operation is ILocalReferenceOperation { Local.DeclaringSyntaxReferences: [var syntaxRef, ..] } &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
615ILocalReferenceOperation localReference => localReference.Local,
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
521if (operation is ILocalReferenceOperation { Local.DeclaringSyntaxReferences: [var syntaxRef, ..] } &&
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
615ILocalReferenceOperation localReference => localReference.Local,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (2)
85localsToIsAssignedMap.AddOrUpdate(localReference.Local, true, (_1, _2) => true); 89usedLocals.Add(localReference.Local);
Microsoft.CodeAnalysis.Features (10)
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
417_allSymbols.Add(localReferenceOperation.Local);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
225=> Unwrap(value) is ILocalReferenceOperation localReference && accumulatorVariable.Equals(localReference.Local);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (2)
106symbolsDeclaredInConditional.AddIfNotNull(localReference.Local); 125if (operation is ILocalReferenceOperation { Local: var local } &&
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
250localOrParameter = localReference.Local;
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (4)
167local = trueLocal.Local; 176if (local != null && !Equals(local, falseLocal.Local)) 179local = falseLocal.Local; 250Equals(variable, localReference.Local))
ValueTracking\ValueTracker.OperationCollector.cs (1)
147ILocalReferenceOperation localReferenceOperation => AddOperationAsync(operation, localReferenceOperation.Local, cancellationToken),
Microsoft.CodeAnalysis.Test.Utilities (15)
Compilation\ControlFlowGraphVerifier.cs (3)
1704if (localReference.Local.ContainingSymbol.IsTopLevelMainMethod() && !isInAssociatedSymbol(localReference.Local.ContainingSymbol, associatedSymbol)) 1712referencedLocalsAndMethods.Add(localReference.Local);
Compilation\OperationTreeVerifier.cs (1)
981LogString($": {operation.Local.Name}");
Compilation\TestOperationVisitor.cs (1)
628Assert.NotNull(operation.Local);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
242ILocalSymbol targetLocal = ((ILocalReferenceOperation)target).Local;
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
118ILocalSymbol targetLocal = ((ILocalReferenceOperation)target).Local;
Diagnostics\OperationTestAnalyzer.cs (8)
165ILocalSymbol testVariable = ((ILocalReferenceOperation)conditionLeft).Local; 174((ILocalReferenceOperation)setupAssignment.Target).Local == testVariable && 239((ILocalReferenceOperation)advanceAssignment.Target).Local == testVariable && 248((ILocalReferenceOperation)advanceOperation.LeftOperand).Local == testVariable && 263((ILocalReferenceOperation)advanceAssignment.Target).Local == testVariable && 277((ILocalReferenceOperation)advanceAssignment.Target).Local == testVariable) 1617var leftLocal = ((ILocalReferenceOperation)left).Local; 1644var operandLocal = ((ILocalReferenceOperation)operand).Local;
Microsoft.CodeAnalysis.VisualBasic.Features (1)
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
181If nextVariable Is Nothing OrElse nextVariable.Local?.Equals(foreachVariable) = False Then
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (3)
247if (operation.Local.IsRef) 254OnReferenceFound(operation.Local, operation); 476_currentAnalysisData.SetTargetsFromSymbolForDelegate(write, localReference.Local);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
145ILocalReferenceOperation localReference => localReference.Local.Equals(symbol),
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (4)
IOperation\IOperationTests.vb (4)
192Assert.Equal(target1.Local.Name, "x") 195Assert.Equal(value1.Local.Name, "y") 220Assert.Equal(target2.Local.Name, "a") 223Assert.Equal(value2.Local.Name, "b")