60 references to Locations
IdeCoreBenchmarks (1)
FindReferencesBenchmarks.cs (1)
125
var locations = refList.SelectMany(r => r.
Locations
).ToList();
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
146
document.Project.Solution, referencedSymbol.
Locations
.ToImmutableArray(), cancellationToken).ConfigureAwait(false);
AbstractMoveDeclarationNearReferenceService.State.cs (1)
98
var references = findReferencesList[0].
Locations
.ToList();
AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
916
referencedSymbols.Single().
Locations
.IsEmpty();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertToRecordEngine.cs (1)
461
var referenceLocations = symbolReferences.SelectMany(reference => reference.
Locations
);
MakeLocalFunctionStaticCodeFixHelper.cs (2)
64
foreach (var location in referencedSymbol.
Locations
)
132
foreach (var location in referencedSymbol.
Locations
)
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertToRecordEngine.cs (1)
461
var referenceLocations = symbolReferences.SelectMany(reference => reference.
Locations
);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
65
var referenceByDocument = implReferences.
Locations
.GroupBy(loc => loc.Document);
MakeLocalFunctionStaticCodeFixHelper.cs (2)
64
foreach (var location in referencedSymbol.
Locations
)
132
foreach (var location in referencedSymbol.
Locations
)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
FindReferences\FindReferencesTests.vb (1)
410
Dim referenceLocations = result.FilterToItemsToShow(options).SelectMany(Function(r) r.
Locations
)
Microsoft.CodeAnalysis.Features (16)
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
146
document.Project.Solution, referencedSymbol.
Locations
.ToImmutableArray(), cancellationToken).ConfigureAwait(false);
AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
916
referencedSymbols.Single().
Locations
.IsEmpty();
ChangeSignature\AbstractChangeSignatureService.cs (1)
354
foreach (var location in symbol.
Locations
)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (2)
524
.SelectMany(refSymbol => refSymbol.
Locations
)
541
.SelectMany(refSymbol => refSymbol.
Locations
)
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
253
foreach (var referenceLocation in reference.
Locations
)
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
307
.SelectMany(reference => reference.
Locations
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
456
.SelectMany(@ref => @ref.
Locations
)
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (1)
43
return referencedSymbol.
Locations
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
267
.SelectMany(referencedSymbol => referencedSymbol.
Locations
)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
348
.SelectMany(refSymbol => refSymbol.
Locations
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (2)
93
if (referencedSymbol?.
Locations
!= null)
95
foreach (var location in referencedSymbol.
Locations
)
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
181
var getReferencesByDocument = getMethodReferences.SelectMany(r => r.
Locations
).ToLookup(loc => loc.Document);
182
var setReferencesByDocument = setMethodReferences.SelectMany(r => r.
Locations
).ToLookup(loc => loc.Document);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
98
from loc in r.
Locations
Microsoft.CodeAnalysis.Workspaces (8)
AbstractMoveDeclarationNearReferenceService.State.cs (1)
98
var references = findReferencesList[0].
Locations
.ToList();
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);
Rename\SymbolicRenameLocations.cs (2)
147
await referencedSymbol.
Locations
.SelectManyInParallelAsync(
152
var implicitLocations = referenceSymbols.SelectMany(refSym => refSym.
Locations
).Where(loc => loc.IsImplicit).ToImmutableArray();
Shared\Extensions\IFindReferencesResultExtensions.cs (2)
37
if (referencedSymbol.
Locations
.Any())
101
let aliasLocations = r.
Locations
.Where(loc => SymbolEquivalenceComparer.Instance.Equals(loc.Alias, aliasSymbol)).ToImmutableArray()
Microsoft.CodeAnalysis.Workspaces.UnitTests (23)
FindReferencesTests.cs (23)
91
Assert.Equal(3, result[0].
Locations
.Count()); // 3 locations found
118
Assert.Equal(1, typeSymbol.
Locations
.Count());
172
Assert.Equal(expected: 2, actual: references.ElementAt(0).
Locations
.Count());
177
Assert.Equal(expected: 2, actual: references.ElementAt(0).
Locations
.Count());
209
Assert.Equal(expected: 0, actual: references.ElementAt(0).
Locations
.Count());
276
Assert.Equal(2, references.ElementAt(0).
Locations
.Count());
281
Assert.Equal(2, references.ElementAt(0).
Locations
.Count());
537
Assert.Equal(1, typeResult.
Locations
.Count());
538
Assert.Equal(1, constructorResult.
Locations
.Count());
541
Assert.NotEqual(typeResult.
Locations
.Single().Location.SourceSpan, constructorResult.
Locations
.Single().Location.SourceSpan);
570
Assert.Equal(1, typeResult.
Locations
.Count());
571
Assert.Equal(1, constructorResult.
Locations
.Count());
574
Assert.NotEqual(typeResult.
Locations
.Single().Location.SourceSpan, constructorResult.
Locations
.Single().Location.SourceSpan);
612
Assert.Equal(2, typeResult.
Locations
.Count());
613
Assert.Equal(1, constructorResult.
Locations
.Count());
616
Assert.True(typeResult.
Locations
.All(loc => loc.Location.SourceSpan != constructorResult.
Locations
.Single().Location.SourceSpan));
619
Assert.NotNull(constructorResult.
Locations
.Single().Alias);
622
Assert.True(typeResult.
Locations
.Count(loc => loc.Alias == null) == 1);
623
Assert.True(typeResult.
Locations
.Count(loc => loc.Alias != null) == 1);
634
foreach (var location in reference.
Locations
)
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
34
var allLocations = referencedSymbol.Locations.Concat(reference.
Locations
.Select(r => r.Location))