1 write to Location
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\ReferenceLocation.cs (1)
78this.Location = location;
58 references to Location
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
194var location = referenceLocation.Location;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
26return x.Location.SourceSpan == y.Location.SourceSpan; 30=> obj.Location.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
132var referenceSpan = location.Location.SourceSpan;
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
132var referenceSpan = location.Location.SourceSpan;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Rename\CSharpRenameRewriterLanguageService.cs (2)
1001var token = await implicitReferenceLocation.Location.SourceTree!.GetTouchingTokenAsync( 1002implicitReferenceLocation.Location.SourceSpan.Start, cancellationToken, findInsideTrivia: false).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (20)
CodeLens\CodeLensFindReferenceProgress.cs (2)
126!reference.Location.IsInSource || 137_locations.Add(location.Location);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
258await AddLocationSpanAsync(referenceLocation.Location, solution, spanSet, tagMap, referenceKind, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItemFactory.cs (1)
290var location = referenceLocation.Location;
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
449.Where(location => !location.IsImplicit && calleeMethodNode.Contains(location.Location.FindNode(getInnermostNodeForTie: true, cancellationToken)))
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
285.OrderByDescending(reference => reference.Location.SourceSpan.Start); 297var reference = refLocation.Location.FindNode(cancellationToken).GetRequiredParent();
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
262.ToImmutableDictionary(refLoc => refLoc.location.Location.FindNode(
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
97var referencedSymbolNode = root.FindNode(location.Location.SourceSpan);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
249var location = referenceLocation.Location; 289var location = referenceLocation.Location;
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (3)
431return x.location.Location.SourceSpan == y.location.Location.SourceSpan; 435=> obj.location.Location.SourceSpan.GetHashCode();
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
194var location = referenceLocation.Location;
ValueTracking\ValueTracker.FindReferencesProgress.cs (5)
44if (!location.Location.IsInSource) 65var node = location.Location.FindNode(cancellationToken); 98var node = location.Location.FindNode(cancellationToken); 146var span = referenceLocation.Location.SourceSpan; 169var span = referenceLocation.Location.SourceSpan;
Microsoft.CodeAnalysis.Workspaces (20)
FindSymbols\FindReferences\Finders\FinderLocation.cs (1)
19/// also has a <see cref="ReferenceLocation.Location"/> property. Importantly, this value
FindSymbols\ReferenceLocation.cs (8)
117EqualityComparer<Location>.Default.Equals(this.Location, other.Location) && 129Hash.Combine(this.Location, this.Document.Id.GetHashCode())))); 136var thisPath = this.Location.SourceTree?.FilePath; 137var otherPath = other.Location.SourceTree?.FilePath; 140(compare = this.Location.SourceSpan.CompareTo(other.Location.SourceSpan)) != 0) 149=> 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)
165referenceLocation.Location.SourceSpan,
Rename\RenameLocation.cs (1)
31: this(referenceLocation.Location, documentId,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (3)
287results.Add(new RenameLocation(location.Location, location.Document.Id, 300location.Location, 308location.Location,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
26return x.Location.SourceSpan == y.Location.SourceSpan; 30=> obj.Location.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107let token = syntaxRoot.FindToken(r.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
FindReferencesTests.cs (7)
555Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 588Assert.NotEqual(typeResult.Locations.Single().Location.SourceSpan, constructorResult.Locations.Single().Location.SourceSpan); 630Assert.True(typeResult.Locations.All(loc => loc.Location.SourceSpan != constructorResult.Locations.Single().Location.SourceSpan)); 650verifier(location.Location);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
293SyntaxNode? referenceNode = root.FindNode(location.Location.SourceSpan);
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
34var allLocations = referencedSymbol.Locations.Concat(reference.Locations.Select(r => r.Location))