2 instantiations of DirectoryNode
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (2)
62
node = new
DirectoryNode
{ Path = rootString, Parent = null };
91
childNode = new
DirectoryNode
{ Path = watchedDirectoryPath[0..(root.Length + pathComponentRange.End.Value)].ToString(), Parent = node };
20 references to DirectoryNode
Microsoft.CodeAnalysis.LanguageServer (20)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (20)
33
/// reporting of file changes; since <see cref="
DirectoryNode
.ActiveContexts"/> is an ImmutableArray we can enumerate it safely.
36
private readonly Dictionary<string,
DirectoryNode
> _roots = new(s_pathStringComparer);
59
if (!_roots.GetAlternateLookup<ReadOnlySpan<char>>().TryGetValue(root, out
var
node))
89
if (!node.Children.GetAlternateLookup<ReadOnlySpan<char>>().TryGetValue(pathComponent, out
var
childNode))
112
var
parentNodeForWatch = node;
151
private void ReleaseWatch(
DirectoryNode
node, FileChangeContext fileChangeContext)
155
var
current = node;
210
var
nodeToConsolidate = _roots.Values.MaxBy(static r => r.ActiveWatchersRecursiveCount);
223
var
childToConsolidate = nodeToConsolidate.Children.Values.MaxBy(static r => r.ActiveWatchersRecursiveCount);
259
private void RemoveWatchersFromChildrenForConsolidation_NoLock(
DirectoryNode
node, ref IList<string>? filters, ImmutableArray<FileChangeContext>.Builder activeContexts)
263
foreach (
var
child in node.Children.Values)
303
public required
DirectoryNode
? Parent { get; init; }
304
public Dictionary<string,
DirectoryNode
> Children { get; } = new Dictionary<string,
DirectoryNode
>(s_pathStringComparer);
350
var
node = this;
385
private readonly
DirectoryNode
_node;
388
public DirectoryWatch(DefaultFileChangeWatcher owner,
DirectoryNode
node, FileChangeContext fileChangeContext)
435
foreach (
var
root in watcher._roots.Values)
446
void AddWatchedDirectoryPaths(
DirectoryNode
node)
451
foreach (
var
child in node.Children.Values)