70 references to SymbolKey
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
SymbolKey\SymbolKeyCompilationsTests.cs (1)
474
var
symkey = SymbolKey.Create(typeSym02, CancellationToken.None);
SymbolKey\SymbolKeyTestBase.cs (3)
82
var
sid = SymbolKey.Create(originalSymbol, CancellationToken.None);
96
var
sid1 = SymbolKey.Create(symbol1, CancellationToken.None);
97
var
sid2 = SymbolKey.Create(symbol2, CancellationToken.None);
SymbolKey\SymbolKeyTests.cs (4)
49
var
symbolKey = SymbolKey.Create(type);
88
var
symbolKey = SymbolKey.Create(type);
124
var
symbolKey = SymbolKey.Create(type);
174
var
symbolKey = SymbolKey.Create(method);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekableItemFactory.cs (1)
84
var
symbolKey = SymbolKey.Create(symbol, cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
MetadataAsSource\OmniSharpMetadataAsSourceHelpers.cs (1)
21
var
symbolKey = SymbolKey.Create(symbol, cancellationToken);
Microsoft.CodeAnalysis.Features (8)
EditAndContinue\SemanticEditInfo.cs (4)
101
/// We use <see cref="
SymbolKey
"/> to represent the symbol rather then <see cref="ISymbol"/>,
103
/// When the edits are processed we map the <see cref="
SymbolKey
"/> to the current compilation.
110
/// We use <see cref="
SymbolKey
"/> to represent the symbol rather then <see cref="ISymbol"/>,
112
/// When the edits are processed we map the <see cref="
SymbolKey
"/> to the current compilation.
FindUsages\DefinitionItem.cs (1)
43
/// metadata-as-source for metadata symbols. We need to store the <see cref="
SymbolKey
"/>
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
80
var
symbolId = SymbolKey.Create(symbol, cancellationToken);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
160
var
key = SymbolKey.Create(symbolToFind, cancellationToken);
264
var
symbolId = SymbolKey.Create(symbol, cancellationToken);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
307
var
symbolKey = actualSemanticEdit.Symbol;
Microsoft.CodeAnalysis.Workspaces (47)
ExternalAccess\UnitTesting\Api\UnitTestingSymbolExtensions.cs (1)
12
=>
SymbolKey
.Create(symbol, cancellationToken).ToString();
FindSymbols\SymbolFinder.cs (1)
167
var
key = symbol.GetSymbolKey(cancellationToken);
FindSymbols\SymbolFinder_FindReferences_Current.cs (1)
42
if (!
SymbolKey
.IsBodyLevelSymbol(symbol) && SerializableSymbolAndProjectId.TryCreate(symbol, solution, cancellationToken, out var serializedSymbol))
Remote\RemoteArguments.cs (3)
89
if (!
SymbolKey
.CanCreate(symbol, cancellationToken))
95
result = new SerializableSymbolAndProjectId(
SymbolKey
.CreateString(symbol, cancellationToken), project.Id);
108
var symbol =
SymbolKey
.ResolveString(
Rename\ConflictEngine\ConflictResolver.cs (3)
56
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
97
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
118
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
40
private readonly ImmutableArray<
SymbolKey
> _nonConflictSymbolKeys;
54
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
Rename\IRemoteRenamerService.cs (2)
34
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
48
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
Rename\LightweightRenameLocations.cs (1)
118
public Task<ConflictResolution> ResolveConflictsAsync(ISymbol symbol, string replacementText, ImmutableArray<
SymbolKey
> nonConflictSymbolKeys, CancellationToken cancellationToken)
Rename\Renamer.cs (2)
149
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
194
ImmutableArray<
SymbolKey
> nonConflictSymbolKeys,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (2)
244
if (!
SymbolKey
.Equals(reader.Compilation, name, symbol.Name))
267
SymbolKey
.Equals(semanticModel.Compilation, symbol.Name, localName))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (15)
20
/// A <see cref="
SymbolKey
"/> is a lightweight identifier for a symbol that can be used to
99
/// <see cref="
SymbolKey
"/>s are not guaranteed to work across different versions of Roslyn. They can be persisted
105
/// The string values produced by <see cref="CreateString"/> (or <see cref="
SymbolKey
.ToString"/>) should not be
107
/// 'same' symbol might produce different strings. Instead, to compare keys use <see cref="
SymbolKey
.GetComparer"/>
112
internal partial struct SymbolKey(string data) : IEquatable<
SymbolKey
>
126
/// Constructs a new <see cref="
SymbolKey
"/> representing the provided <paramref name="symbol"/>.
128
public static
SymbolKey
Create(ISymbol? symbol, CancellationToken cancellationToken = default)
132
/// Returns an <see cref="IEqualityComparer{T}"/> that determines if two <see cref="
SymbolKey
"/>s
144
public static IEqualityComparer<
SymbolKey
> GetComparer(bool ignoreCase = false, bool ignoreAssemblyKeys = false)
187
failureReason = $"({nameof(
SymbolKey
)} invalid format '${version}')";
219
/// Tries to resolve this <see cref="
SymbolKey
"/> in the given
229
/// Returns this <see cref="
SymbolKey
"/> encoded as a string. This can be persisted
352
=> obj is
SymbolKey
symbolKey && this.Equals(symbolKey);
354
public readonly bool Equals(
SymbolKey
other)
357
private readonly bool Equals(
SymbolKey
other, bool ignoreCase)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ParameterSymbolKey.cs (1)
87
if (
SymbolKey
.Equals(reader.Compilation, parameter.MetadataName, metadataName))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyComparer.cs (6)
12
private sealed class SymbolKeyComparer : IEqualityComparer<
SymbolKey
>
19
public bool Equals(
SymbolKey
x,
SymbolKey
y)
49
public int GetHashCode(
SymbolKey
obj)
52
public static IEqualityComparer<
SymbolKey
> GetComparer(bool ignoreCase, bool ignoreAssemblyKey)
63
public static IEqualityComparer<
SymbolKey
> GetComparer(ComparisonOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyExtensions.cs (2)
11
public static
SymbolKey
GetSymbolKey(this ISymbol? symbol, CancellationToken cancellationToken = default)
12
=>
SymbolKey
.Create(symbol, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKeyResolution.cs (2)
10
/// The result of <see cref="
SymbolKey
.Resolve"/>. If the <see cref="
SymbolKey
"/> could be uniquely mapped to a
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
83
var
symbolId = symbol.GetSymbolKey(cancellationToken);
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
49
/// cref="
SymbolKey
"/>) to resolve that symbol back in that that <see cref="Project"/>.
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
69
if (
SymbolKey
.IsBodyLevelSymbol(symbol))
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
SymbolKeyTests.cs (4)
958
var
key = SymbolKey.Create(method);
1313
var
symbolKey1 = SymbolKey.Create(compilation1.GetSpecialType(SpecialType.System_Int32));
1314
var
symbolKey2 = SymbolKey.Create(compilation2.GetSpecialType(SpecialType.System_Int32));
1424
var
key = SymbolKey.Create(symbol);