42 references to TreeAndVersion
Microsoft.CodeAnalysis.Workspaces (42)
Workspace\Solution\DocumentState.cs (19)
129private static async Task<TreeAndVersion> FullyParseTreeAsync( 145private static TreeAndVersion FullyParseTree( 161private static TreeAndVersion CreateTreeAndVersion( 192private static async Task<TreeAndVersion> IncrementallyParseTreeAsync( 203var oldTreeAndVersion = await oldTreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 214private static TreeAndVersion IncrementallyParseTree( 225var oldTreeAndVersion = oldTreeSource.GetValue(cancellationToken); 236private static TreeAndVersion IncrementallyParse( 238TreeAndVersion oldTreeAndVersion, 252private static TreeAndVersion MakeNewTreeAndVersion(SyntaxTree oldTree, SourceText oldText, VersionStamp oldVersion, SyntaxTree newTree, SourceText newText, VersionStamp newVersion) 351TreeSource.TryGetValue(out var existingTreeAndVersion)) 531static (ITextAndVersionSource, TreeAndVersion) CreateTreeWithLazyText( 564if (!TreeSource.TryGetValue(out var oldTreeAndVersion) || !oldTreeAndVersion!.Tree.TryGetRoot(out var oldRoot)) 589if (TreeSource != null && TreeSource.TryGetValue(out var treeAndVersion) && treeAndVersion != null) 600if (TreeSource != null && TreeSource.TryGetValue(out var treeAndVersion) && treeAndVersion != null) 616var treeAndVersion = await TreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 628var treeAndVersion = TreeSource.GetValue(cancellationToken); 637if (TreeSource != null && TreeSource.TryGetValue(out var treeAndVersion) && treeAndVersion != null) 656if (TreeSource.TryGetValue(out var treeAndVersion) && treeAndVersion != null)
Workspace\Solution\DocumentState_LinkedFileReuse.cs (11)
25AsyncLazy<TreeAndVersion> lazyComputation) : ITreeAndVersionSource 45public Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken) 48public TreeAndVersion GetValue(CancellationToken cancellationToken) 51public bool TryGetValue([NotNullWhen(true)] out TreeAndVersion? value) 135[NotNullWhen(true)] out TreeAndVersion? newTreeAndVersion) 233static async Task<TreeAndVersion> TryReuseSiblingTreeAsync( 244var siblingTreeAndVersion = await siblingTreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 249if (TryReuseSiblingRoot(filePath, languageServices, loadTextOptions, parseOptions, siblingRoot, siblingTreeAndVersion.Version, forceEvenIfTreesWouldDiffer, out var newTreeAndVersion)) 256static TreeAndVersion TryReuseSiblingTree( 267var siblingTreeAndVersion = siblingTreeSource.GetValue(cancellationToken); 272if (TryReuseSiblingRoot(filePath, languageServices, loadTextOptions, parseOptions, siblingRoot, siblingTreeAndVersion.Version, forceEvenIfTreesWouldDiffer, out var newTreeAndVersion))
Workspace\Solution\VersionSource\ITreeAndVersionSource.cs (3)
17Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken); 18TreeAndVersion GetValue(CancellationToken cancellationToken); 19bool TryGetValue([NotNullWhen(true)] out TreeAndVersion? value);
Workspace\Solution\VersionSource\SimpleTreeAndVersionSource.cs (9)
19private readonly AsyncLazy<TreeAndVersion> _source; 21private SimpleTreeAndVersionSource(AsyncLazy<TreeAndVersion> source) 26public Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken) 29public TreeAndVersion GetValue(CancellationToken cancellationToken) 32public bool TryGetValue([NotNullWhen(true)] out TreeAndVersion? value) 36Func<TArg, CancellationToken, Task<TreeAndVersion>> asynchronousComputeFunction, 37Func<TArg, CancellationToken, TreeAndVersion>? synchronousComputeFunction, TArg arg) 39return new(AsyncLazy<TreeAndVersion>.Create(asynchronousComputeFunction, synchronousComputeFunction, arg)); 42public static SimpleTreeAndVersionSource Create(TreeAndVersion source)