48 references to Locations
IdeCoreBenchmarks (1)
FindReferencesBenchmarks.cs (1)
112
var locations = refList.SelectMany(r => r.
Locations
).ToList();
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
146
document.Project.Solution, [.. referencedSymbol.
Locations
], cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
926
referencedSymbols.Single().
Locations
.IsEmpty();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
98
var references = findReferencesList[0].
Locations
.ToList();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
478
var referenceLocations = symbolReferences.SelectMany(reference => reference.
Locations
);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
130
foreach (var location in referencedSymbol.
Locations
)
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
478
var referenceLocations = symbolReferences.SelectMany(reference => reference.
Locations
);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
130
foreach (var location in referencedSymbol.
Locations
)
Microsoft.CodeAnalysis.Features (9)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
255
foreach (var referenceLocation in reference.
Locations
)
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
300
.SelectMany(reference => reference.
Locations
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
448
.SelectMany(@ref => @ref.
Locations
)
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
282
.SelectMany(referencedSymbol => referencedSymbol.
Locations
)
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (2)
93
if (referencedSymbol?.
Locations
!= null)
95
foreach (var location in referencedSymbol.
Locations
)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
173
var getReferencesByDocument = getMethodReferences.SelectMany(r => r.
Locations
).ToLookup(loc => loc.Document);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
93
from loc in r.
Locations
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
926
referencedSymbols.Single().
Locations
.IsEmpty();
Microsoft.CodeAnalysis.Workspaces (6)
FindSymbols\ReferencedSymbol.cs (2)
32
/// Same as <see cref="
Locations
"/> but exposed as an <see cref="ImmutableArray{T}"/> for performance.
51
var count = this.
Locations
.Count();
FindSymbols\SymbolFinder_Callers.cs (1)
67
var result = await reference.
Locations
.FindReferencingSymbolsAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\IFindReferencesResultExtensions.cs (2)
37
if (referencedSymbol.
Locations
.Any())
106
let aliasLocations = r.
Locations
.Where(loc => SymbolEquivalenceComparer.Instance.Equals(loc.Alias, aliasSymbol)).ToImmutableArray()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
98
var references = findReferencesList[0].
Locations
.ToList();
Microsoft.CodeAnalysis.Workspaces.UnitTests (23)
FindReferencesTests.cs (23)
108
Assert.Equal(3, result[0].
Locations
.Count()); // 3 locations found
135
Assert.Equal(1, typeSymbol.
Locations
.Count());
189
Assert.Equal(expected: 2, actual: references.ElementAt(0).
Locations
.Count());
194
Assert.Equal(expected: 2, actual: references.ElementAt(0).
Locations
.Count());
226
Assert.Equal(expected: 0, actual: references.ElementAt(0).
Locations
.Count());
293
Assert.Equal(2, references.ElementAt(0).
Locations
.Count());
298
Assert.Equal(2, references.ElementAt(0).
Locations
.Count());
551
Assert.Equal(1, typeResult.
Locations
.Count());
552
Assert.Equal(1, constructorResult.
Locations
.Count());
555
Assert.NotEqual(typeResult.
Locations
.Single().Location.SourceSpan, constructorResult.
Locations
.Single().Location.SourceSpan);
584
Assert.Equal(1, typeResult.
Locations
.Count());
585
Assert.Equal(1, constructorResult.
Locations
.Count());
588
Assert.NotEqual(typeResult.
Locations
.Single().Location.SourceSpan, constructorResult.
Locations
.Single().Location.SourceSpan);
626
Assert.Equal(2, typeResult.
Locations
.Count());
627
Assert.Equal(1, constructorResult.
Locations
.Count());
630
Assert.True(typeResult.
Locations
.All(loc => loc.Location.SourceSpan != constructorResult.
Locations
.Single().Location.SourceSpan));
633
Assert.NotNull(constructorResult.
Locations
.Single().Alias);
636
Assert.True(typeResult.
Locations
.Count(loc => loc.Alias == null) == 1);
637
Assert.True(typeResult.
Locations
.Count(loc => loc.Alias != null) == 1);
648
foreach (var location in reference.
Locations
)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
284
foreach (ReferenceLocation location in referencedSymbol.
Locations
)
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
34
var allLocations = referencedSymbol.Locations.Concat(reference.
Locations
.Select(r => r.Location))