1 write to Location
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\ReferenceLocation.cs (1)
78this.Location = location;
69 references to Location
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
198var location = referenceLocation.Location;
AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ConvertToRecordEngine.cs (1)
477.Select(referenceLocations => referenceLocations.Location.FindNode(cancellationToken).Parent)
MakeLocalFunctionStaticCodeFixHelper.cs (2)
68var referenceNode = root.FindNode(location.Location.SourceSpan); 134var referenceSpan = location.Location.SourceSpan;
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertToRecordEngine.cs (1)
477.Select(referenceLocations => referenceLocations.Location.FindNode(cancellationToken).Parent)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
82var location = refLocation.Location;
MakeLocalFunctionStaticCodeFixHelper.cs (2)
68var referenceNode = root.FindNode(location.Location.SourceSpan); 134var referenceSpan = location.Location.SourceSpan;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Rename\CSharpRenameRewriterLanguageService.cs (2)
1009var token = await implicitReferenceLocation.Location.SourceTree!.GetTouchingTokenAsync( 1010implicitReferenceLocation.Location.SourceSpan.Start, cancellationToken, findInsideTrivia: false).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
FindReferences\FindReferencesTests.vb (1)
416Select(Function(loc) loc.Location).
Microsoft.CodeAnalysis.Features (30)
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
198var location = referenceLocation.Location;
ChangeSignature\AbstractChangeSignatureService.cs (2)
356if (location.Location.IsInMetadata) 362if (!TryGetNodeWithEditableSignatureOrAttributes(location.Location, currentSolution, out var nodeToUpdate2, out var documentId2))
CodeLens\CodeLensFindReferenceProgress.cs (2)
136!reference.Location.IsInSource || 147_locations.Add(location.Location);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
728var refNode = root.FindNode(refLoc.ReferenceLocation.Location.SourceSpan, findInsideTrivia: true, getInnermostNodeForTie: true);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
256await AddLocationSpanAsync(referenceLocation.Location, solution, spanSet, tagMap, referenceKind, cancellationToken).ConfigureAwait(false);
FindUsages\IDefinitionsAndReferencesFactory.cs (1)
245var location = referenceLocation.Location;
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
309.Select(location => location.Location.FindNode(getInnermostNodeForTie: true, cancellationToken)))
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
457.Where(location => !location.IsImplicit && calleeMethodNode.Contains(location.Location.FindNode(getInnermostNodeForTie: true, cancellationToken)))
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (2)
44.Where(loc => !semanticModel.SyntaxTree.OverlapsHiddenPosition(loc.Location.SourceSpan, cancellationToken)) 45.Select(loc => root.FindToken(loc.Location.SourceSpan.Start).Parent as TIdentifierNameSyntax)
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
270.OrderByDescending(reference => reference.Location.SourceSpan.Start); 282var reference = refLocation.Location.FindNode(cancellationToken).GetRequiredParent();
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
257.ToImmutableDictionary(refLoc => refLoc.location.Location.FindNode(
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
97var referencedSymbolNode = root.FindNode(location.Location.SourceSpan);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (5)
253var location = referenceLocation.Location; 293var location = referenceLocation.Location; 492return x.Location.SourceSpan == y.Location.SourceSpan; 496=> obj.Location.SourceSpan.GetHashCode();
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (4)
262var location = referenceLocation.Location; 438return x.location.Location.SourceSpan == y.location.Location.SourceSpan; 442=> obj.location.Location.SourceSpan.GetHashCode();
ValueTracking\ValueTracker.FindReferencesProgress.cs (5)
41if (!location.Location.IsInSource) 62var node = location.Location.FindNode(cancellationToken); 95var node = location.Location.FindNode(cancellationToken); 143var span = referenceLocation.Location.SourceSpan; 166var span = referenceLocation.Location.SourceSpan;
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
816Dim token = Await implicitReferenceLocation.Location.SourceTree.GetTouchingTokenAsync( 817implicitReferenceLocation.Location.SourceSpan.Start, cancellationToken, findInsideTrivia:=False).ConfigureAwait(False)
Microsoft.CodeAnalysis.Workspaces (17)
AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
FindSymbols\FindReferences\Finders\FinderLocation.cs (1)
19/// also has a <see cref="ReferenceLocation.Location"/> property. Importantly, this value
FindSymbols\ReferenceLocation.cs (8)
129EqualityComparer<Location>.Default.Equals(this.Location, other.Location) && 141Hash.Combine(this.Location, this.Document.Id.GetHashCode())))); 148var thisPath = this.Location.SourceTree?.FilePath; 149var otherPath = other.Location.SourceTree?.FilePath; 152(compare = this.Location.SourceSpan.CompareTo(other.Location.SourceSpan)) != 0) 161=> string.Format("{0}: {1}", this.Document.Name, this.Location);
FindSymbols\ReferenceLocationExtensions.cs (2)
64locations.Add(reference.Location); 73var enclosingSymbol = semanticModel.GetEnclosingSymbol(reference.Location.SourceSpan.Start);
Remote\RemoteArguments.cs (1)
182referenceLocation.Location.SourceSpan,
Rename\RenameLocation.cs (1)
42: this(referenceLocation.Location, documentId,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (3)
280results.Add(new RenameLocation(location.Location, location.Document.Id, 293location.Location, 301location.Location,
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
FindReferencesTests.cs (7)
541Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 574Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 616Assert.True(typeResult.Locations.All(loc => loc.Location.SourceSpan != constructorResult.Locations.Single().Location.SourceSpan)); 636verifier(location.Location);
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
34var allLocations = referencedSymbol.Locations.Concat(reference.Locations.Select(r => r.Location))