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