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