40 references to AsyncLazy
Microsoft.CodeAnalysis.Workspaces (40)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (2)
66var lazyCompilation = AsyncLazy.Create(static (project, cancellationToken) => 119var lazyAssembly = AsyncLazy.Create(static async (arg, cancellationToken) =>
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
38project.State, p => AsyncLazy.Create(
FindSymbols\FindReferences\FindReferenceCache.cs (1)
30var lazy = s_cache.GetValue(document, static document => AsyncLazy.Create(ComputeCacheAsync, document));
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
126query, AsyncLazy.Create((IAssemblySymbol?)assembly), filter, cancellationToken);
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
161id => AsyncLazy.Create(static (arg, c) => 181metadataId => AsyncLazy.Create(static (arg, cancellationToken) =>
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
74static p => AsyncLazy.Create(
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
26_lazyAnalyzerConfig = lazyAnalyzerConfig ?? AsyncLazy.Create(
Workspace\Solution\Document.cs (1)
564var newAsyncLazy = AsyncLazy.Create(static async (arg, cancellationToken) =>
Workspace\Solution\DocumentState.cs (1)
545AsyncLazy.Create(
Workspace\Solution\DocumentState_LinkedFileReuse.cs (1)
117var lazyComputation = AsyncLazy.Create(
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
37public readonly AsyncLazy<Value> Lazy = AsyncLazy.Create(
Workspace\Solution\ProjectState.cs (11)
91_lazyChecksums = AsyncLazy.Create(static (self, cancellationToken) => self.ComputeChecksumsAsync(cancellationToken), arg: this); 92_lazyContentHashToDocumentId = AsyncLazy.Create(static (self, cancellationToken) => self.ComputeContentHashToDocumentIdAsync(cancellationToken), arg: this); 123_lazyLatestDocumentVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentVersionAsync(self.DocumentStates, self.AdditionalDocumentStates, c), arg: this); 124_lazyLatestDocumentTopLevelChangeVersion = AsyncLazy.Create(static (self, c) => ComputeLatestDocumentTopLevelChangeVersionAsync(self.DocumentStates, self.AdditionalDocumentStates, c), arg: this); 132_lazyChecksums = AsyncLazy.Create(static (self, cancellationToken) => self.ComputeChecksumsAsync(cancellationToken), arg: this); 133_lazyContentHashToDocumentId = AsyncLazy.Create(static (self, cancellationToken) => self.ComputeContentHashToDocumentIdAsync(cancellationToken), arg: this); 231return AsyncLazy.Create(static (arg, cancellationToken) => 237return AsyncLazy.Create(static (arg, cancellationToken) => 1068dependentDocumentVersion = AsyncLazy.Create(static (arg, cancellationToken) => 1074dependentDocumentVersion = AsyncLazy.Create( 1092dependentSemanticVersion = AsyncLazy.Create(static (arg, cancellationToken) =>
Workspace\Solution\Solution.cs (3)
53AsyncLazy.Create(synchronousComputeFunction: static (self, c) => 1532=> AsyncLazy.Create(synchronousComputeFunction: static (arg, cancellationToken) => 1544solution._documentIdToFrozenSolution.Add(documentId, AsyncLazy.Create(solution));
Workspace\Solution\SolutionCompilationState.cs (2)
74_lazyChecksums = AsyncLazy.Create(static async (self, cancellationToken) => 81AsyncLazy.Create(synchronousComputeFunction: static (self, c) =>
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (3)
1020AsyncLazy.Create(static (arg, c) => 1059AsyncLazy.Create(static (arg, c) => 1097AsyncLazy.Create(static (arg, c) =>
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
211compilation => AsyncLazy.Create(static (arg, cancellationToken) =>
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (1)
156AsyncLazy.Create(static (arg, c) =>
Workspace\Solution\SolutionCompilationState_Checksum.cs (1)
83checksums = AsyncLazy.Create(static async (arg, cancellationToken) =>
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
125_ => AsyncLazy.Create(
Workspace\Solution\SolutionState.cs (1)
91_lazyChecksums = AsyncLazy.Create(static (self, c) =>
Workspace\Solution\SolutionState_Checksum.cs (1)
82checksums = AsyncLazy.Create(
Workspace\Solution\TextDocumentState.cs (1)
45_lazyChecksums = AsyncLazy.Create(static (self, cancellationToken) => self.ComputeChecksumsAsync(cancellationToken), arg: this);
Workspace\Solution\VersionSource\SimpleTreeAndVersionSource.cs (1)
43=> new(AsyncLazy.Create(source));