2 instantiations of DirectoryNode
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (2)
62node = new DirectoryNode { Path = rootString, Parent = null }; 91childNode = 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. 36private readonly Dictionary<string, DirectoryNode> _roots = new(s_pathStringComparer); 59if (!_roots.GetAlternateLookup<ReadOnlySpan<char>>().TryGetValue(root, out var node)) 89if (!node.Children.GetAlternateLookup<ReadOnlySpan<char>>().TryGetValue(pathComponent, out var childNode)) 112var parentNodeForWatch = node; 151private void ReleaseWatch(DirectoryNode node, FileChangeContext fileChangeContext) 155var current = node; 210var nodeToConsolidate = _roots.Values.MaxBy(static r => r.ActiveWatchersRecursiveCount); 223var childToConsolidate = nodeToConsolidate.Children.Values.MaxBy(static r => r.ActiveWatchersRecursiveCount); 259private void RemoveWatchersFromChildrenForConsolidation_NoLock(DirectoryNode node, ref IList<string>? filters, ImmutableArray<FileChangeContext>.Builder activeContexts) 263foreach (var child in node.Children.Values) 303public required DirectoryNode? Parent { get; init; } 304public Dictionary<string, DirectoryNode> Children { get; } = new Dictionary<string, DirectoryNode>(s_pathStringComparer); 350var node = this; 385private readonly DirectoryNode _node; 388public DirectoryWatch(DefaultFileChangeWatcher owner, DirectoryNode node, FileChangeContext fileChangeContext) 435foreach (var root in watcher._roots.Values) 446void AddWatchedDirectoryPaths(DirectoryNode node) 451foreach (var child in node.Children.Values)