2 instantiations of CacheEntry
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\CompletionProviders\ImportCompletion\ImportCompletionProviderHelper.cs (2)
21
public static CacheEntry Default { get; } =
new
(null, Checksum.Null, ImmutableArray<string>.Empty);
73
_sdkGlobalUsingsCache[project.Id] =
new
(globalUsingDocument.Id, checksum, globalUsings);
7 references to CacheEntry
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\CompletionProviders\ImportCompletion\ImportCompletionProviderHelper.cs (7)
21
public static
CacheEntry
Default { get; } = new(null, Checksum.Null, ImmutableArray<string>.Empty);
24
private static readonly ConcurrentDictionary<ProjectId,
CacheEntry
> _sdkGlobalUsingsCache = new();
33
if (_sdkGlobalUsingsCache.TryGetValue(context.Document.Project.Id, out
var
cacheEntry))
43
var globalUsings = await GetGlobalUsingsAsync(context.Document.Project,
CacheEntry
.Default, cancellationToken).ConfigureAwait(false);
47
static async Task<ImmutableArray<string>> GetGlobalUsingsAsync(Project project,
CacheEntry
cacheEntry, CancellationToken cancellationToken)
60
_sdkGlobalUsingsCache[project.Id] =
CacheEntry
.Default;
61
return
CacheEntry
.Default.GlobalUsings;