4 instantiations of SymbolTreeInfo
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
106
return new
SymbolTreeInfo
(checksum, sortedNodes,
117
return new
SymbolTreeInfo
(
441
return new
SymbolTreeInfo
(
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
252
return new
SymbolTreeInfo
(
92 references to SymbolTreeInfo
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (24)
FindSymbols\SymbolTreeInfoTests.cs (24)
31
var
info1 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
34
var
info2 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
38
Assert.Equal(info1.Checksum,
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None));
39
Assert.Equal(info2.Checksum,
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None));
52
var checksum1 =
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None);
53
var
info1 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
56
var checksum2 =
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None);
57
var
info2 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
75
var checksum1 =
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None);
76
var
info1 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
79
var
info2 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
84
Assert.Equal(info2.Checksum,
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None));
97
var
info1 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
100
var checksum2 =
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None);
101
var
info2 = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
105
Assert.Equal(info1.Checksum,
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None));
Microsoft.CodeAnalysis.Features (10)
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (1)
51
var
info = await service.TryGetPotentiallyStaleMetadataSymbolTreeInfoAsync(_assemblyProject, _metadataReference, CancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (1)
39
var
info = await service.TryGetPotentiallyStaleSourceSymbolTreeInfoAsync(_project, CancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
167
var checksum = await
SymbolTreeInfo
.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false);
200
checksum:
SymbolTreeInfo
.GetMetadataChecksum(solution.Services, peReference, cancellationToken),
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
251
var checksum = await
SymbolTreeInfo
.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (5)
89
await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(project.Solution, peReference, checksum: null, cancellationToken).ConfigureAwait(false);
198
SymbolTreeInfo
? symbolInfo;
201
symbolInfo = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
206
var cachedInfoTask =
SymbolTreeInfo
.TryGetCachedInfoForMetadataReferenceIgnoreChecksumAsync(peReference, cancellationToken);
459
private MultiDictionary<string, (string methodName, string receiverTypeName)> CreateAggregatedFilter(
SymbolTreeInfo
symbolInfo)
Microsoft.CodeAnalysis.Workspaces (54)
FindSymbols\Declarations\DeclarationFinder.cs (2)
84
var
info = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
344
var
symbolTreeInfo = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
FindSymbols\SymbolTree\ISymbolTreeInfoCacheService.cs (3)
12
/// Computes and caches <see cref="
SymbolTreeInfo
"/> indices for the source symbols in <see cref="Project"/>s and
17
ValueTask<
SymbolTreeInfo
?> TryGetPotentiallyStaleSourceSymbolTreeInfoAsync(Project project, CancellationToken cancellationToken);
18
ValueTask<
SymbolTreeInfo
?> TryGetPotentiallyStaleMetadataSymbolTreeInfoAsync(Project project, PortableExecutableReference reference, CancellationToken cancellationToken);
FindSymbols\SymbolTree\MetadataInfo.cs (2)
18
public readonly
SymbolTreeInfo
SymbolTreeInfo;
29
public MetadataInfo(
SymbolTreeInfo
info, HashSet<ProjectId> referencingProjects)
FindSymbols\SymbolTree\SymbolTreeInfo.cs (4)
101
public static
SymbolTreeInfo
CreateEmpty(Checksum checksum)
112
public
SymbolTreeInfo
WithChecksum(Checksum checksum)
406
internal void AssertEquivalentTo(
SymbolTreeInfo
other)
432
private static
SymbolTreeInfo
CreateSymbolTreeInfo(
FindSymbols\SymbolTree\SymbolTreeInfo.Node.cs (1)
21
/// produce the final <see cref="
SymbolTreeInfo
"/> though we will then convert
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (16)
40
private static readonly ConditionalWeakTable<PortableExecutableReference, AsyncLazy<
SymbolTreeInfo
>> s_peReferenceToInfo = new();
49
/// computation of the <see cref="
SymbolTreeInfo
"/> once per <see cref="MetadataId"/>, but we may then have to
52
private static readonly ConditionalWeakTable<MetadataId, AsyncLazy<
SymbolTreeInfo
>> s_metadataIdToSymbolTreeInfo = new();
95
/// Produces a <see cref="
SymbolTreeInfo
"/> for a given <see cref="PortableExecutableReference"/>.
100
/// and used for the <see cref="
SymbolTreeInfo
"/>.</param>
102
public static async ValueTask<
SymbolTreeInfo
> GetInfoForMetadataReferenceAsync(
112
var
info = await infoTask.GetValueAsync(cancellationToken).ConfigureAwait(false);
120
static async Task<
SymbolTreeInfo
> GetInfoForMetadataReferenceSlowAsync(
138
id => new AsyncLazy<
SymbolTreeInfo
>(
145
static async Task<
SymbolTreeInfo
> CreateMetadataSymbolTreeInfoAsync(
158
metadataId => new AsyncLazy<
SymbolTreeInfo
>(
163
createAsync: checksum => new ValueTask<
SymbolTreeInfo
>(new MetadataInfoCreator(checksum, GetMetadataNoThrow(reference)).Create()),
168
var
metadataIdSymbolTreeInfo = await asyncLazy.GetValueAsync(cancellationToken).ConfigureAwait(false);
178
public static async Task<
SymbolTreeInfo
?> TryGetCachedInfoForMetadataReferenceIgnoreChecksumAsync(PortableExecutableReference reference, CancellationToken cancellationToken)
224
public static Task<
SymbolTreeInfo
?> LoadAnyInfoForMetadataReferenceAsync(
298
internal
SymbolTreeInfo
Create()
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (7)
28
private static async Task<
SymbolTreeInfo
> LoadOrCreateAsync(
32
Func<Checksum, ValueTask<
SymbolTreeInfo
>> createAsync,
41
var
read = await LoadAsync(services, solutionKey, checksum, checksumMustMatch: true, keySuffix, cancellationToken).ConfigureAwait(false);
53
SymbolTreeInfo
result;
82
private static async Task<
SymbolTreeInfo
?> LoadAsync(
184
private static
SymbolTreeInfo
? TryReadSymbolTreeInfo(
265
public static
SymbolTreeInfo
? ReadSymbolTreeInfo(ObjectReader reader, Checksum checksum)
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (3)
35
public static Task<
SymbolTreeInfo
> GetInfoForSourceAssemblyAsync(
54
public static async Task<
SymbolTreeInfo
?> LoadAnyInfoForSourceAssemblyAsync(
117
internal static async ValueTask<
SymbolTreeInfo
> CreateSourceSymbolTreeInfoAsync(
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (14)
29
private readonly ConcurrentDictionary<ProjectId, (VersionStamp semanticVersion,
SymbolTreeInfo
info)> _projectIdToInfo = new();
63
/// Gets the latest computed <see cref="
SymbolTreeInfo
"/> for the requested <paramref name="reference"/>.
67
public async ValueTask<
SymbolTreeInfo
?> TryGetPotentiallyStaleMetadataSymbolTreeInfoAsync(
84
var
info = await
SymbolTreeInfo
.LoadAnyInfoForMetadataReferenceAsync(solution, reference, cancellationToken).ConfigureAwait(false);
94
public async ValueTask<
SymbolTreeInfo
?> TryGetPotentiallyStaleSourceSymbolTreeInfoAsync(
108
var
info = await
SymbolTreeInfo
.LoadAnyInfoForSourceAssemblyAsync(project, cancellationToken).ConfigureAwait(false);
172
var checksum = await
SymbolTreeInfo
.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false);
176
var
info = await
SymbolTreeInfo
.GetInfoForSourceAssemblyAsync(
194
var checksum =
SymbolTreeInfo
.GetMetadataChecksum(project.Solution.Services, reference, cancellationToken);
198
var
info = await
SymbolTreeInfo
.GetInfoForMetadataReferenceAsync(
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
FindAllDeclarationsTests.cs (4)
670
var
info = await
SymbolTreeInfo
.CreateSourceSymbolTreeInfoAsync(
681
var
readInfo =
SymbolTreeInfo
.TestAccessor.ReadSymbolTreeInfo(reader, Checksum.Null);