1 write to Location
Microsoft.CodeAnalysis.Workspaces (1)
FindSymbols\ReferenceLocation.cs (1)
78
this.
Location
= location;
87 references to Location
GenerateDocumentationAndConfigFiles (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Microsoft.CodeAnalysis.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
194
var location = referenceLocation.
Location
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
130
var referenceSpan = location.
Location
.SourceSpan;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
137
if (reference.
Location
.FindNode(cancellationToken) is not IdentifierNameSyntax node)
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
130
var referenceSpan = location.
Location
.SourceSpan;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
137
if (reference.
Location
.FindNode(cancellationToken) is not IdentifierNameSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Rename\CSharpRenameRewriterLanguageService.cs (2)
972
var token = await implicitReferenceLocation.
Location
.SourceTree!.GetTouchingTokenAsync(
973
implicitReferenceLocation.
Location
.SourceSpan.Start, cancellationToken, findInsideTrivia: false).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (24)
ChangeSignature\AbstractChangeSignatureService.cs (2)
354
if (location.
Location
.IsInMetadata)
360
if (!TryGetNodeWithEditableSignatureOrAttributes(location.
Location
, currentSolution, out var nodeToUpdate2, out var documentId2))
CodeLens\CodeLensFindReferenceProgress.cs (2)
124
!reference.
Location
.IsInSource ||
135
_locations.Add(location.
Location
);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
771
var refNode = root.FindNode(refLoc.ReferenceLocation.
Location
.SourceSpan, findInsideTrivia: true, getInnermostNodeForTie: true);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
258
await AddLocationSpanAsync(referenceLocation.
Location
, solution, spanSet, tagMap, referenceKind, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItemFactory.cs (1)
291
var 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)
290
.OrderByDescending(reference => reference.
Location
.SourceSpan.Start);
302
var reference = refLocation.
Location
.FindNode(cancellationToken).GetRequiredParent();
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
262
.ToImmutableDictionary(refLoc => refLoc.location.
Location
.FindNode(
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
97
var referencedSymbolNode = root.FindNode(location.
Location
.SourceSpan);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
249
var location = referenceLocation.
Location
;
289
var location = referenceLocation.
Location
;
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (4)
254
var location = referenceLocation.
Location
;
431
return x.location.
Location
.SourceSpan == y.location.
Location
.SourceSpan;
435
=> obj.location.
Location
.SourceSpan.GetHashCode();
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
194
var location = referenceLocation.
Location
;
ValueTracking\ValueTracker.FindReferencesProgress.cs (5)
45
if (!location.
Location
.IsInSource)
66
var node = location.
Location
.FindNode(cancellationToken);
99
var node = location.
Location
.FindNode(cancellationToken);
147
var span = referenceLocation.
Location
.SourceSpan;
170
var span = referenceLocation.
Location
.SourceSpan;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
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)
117
EqualityComparer<Location>.Default.Equals(this.
Location
, other.
Location
) &&
129
Hash.Combine(this.
Location
, this.Document.Id.GetHashCode()))));
136
var thisPath = this.
Location
.SourceTree?.FilePath;
137
var 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)
64
locations.Add(reference.
Location
);
73
var enclosingSymbol = semanticModel.GetEnclosingSymbol(reference.
Location
.SourceSpan.Start);
Remote\RemoteArguments.cs (1)
165
referenceLocation.
Location
.SourceSpan,
Rename\RenameLocation.cs (1)
31
: this(referenceLocation.
Location
, documentId,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (3)
291
results.Add(new RenameLocation(location.
Location
, location.Document.Id,
304
location.
Location
,
312
location.
Location
,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
FindReferencesTests.cs (7)
555
Assert.NotEqual(typeResult.Locations.Single().
Location
.SourceSpan, constructorResult.Locations.Single().
Location
.SourceSpan);
588
Assert.NotEqual(typeResult.Locations.Single().
Location
.SourceSpan, constructorResult.Locations.Single().
Location
.SourceSpan);
630
Assert.True(typeResult.Locations.All(loc => loc.
Location
.SourceSpan != constructorResult.Locations.Single().
Location
.SourceSpan));
650
verifier(location.
Location
);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
293
SyntaxNode? referenceNode = root.FindNode(location.
Location
.SourceSpan);
Roslyn.Diagnostics.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)
Text.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\FindSymbols\LinkedFileReferenceLocationEqualityComparer.cs (3)
25
return x.
Location
.SourceSpan == y.
Location
.SourceSpan;
29
=> obj.
Location
.SourceSpan.GetHashCode();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
107
let token = syntaxRoot.FindToken(r.
Location
.SourceSpan.Start)