10 references to _explicitlyWatchedFiles
Microsoft.CodeAnalysis.LanguageServer (10)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.FileChangeContext.cs (10)
18/// A monitor lock held for code touching <see cref="_explicitlyWatchedFiles"/>, and <see cref="_watchedDirectoriesWatches"/> during disposal. It is not expected to be held 64if (_explicitlyWatchedFiles.TryGetValue(filePath, out var countAndWatcher)) 66_explicitlyWatchedFiles[filePath] = countAndWatcher with { count = countAndWatcher.count + 1 }; 73_explicitlyWatchedFiles.Add(filePath, countAndWatcher); 112=> _explicitlyWatchedFiles.ContainsKey(filePath) || 123if (!_explicitlyWatchedFiles.TryGetValue(filePath, out var countAndWatcher)) 129_explicitlyWatchedFiles.Remove(filePath); 133_explicitlyWatchedFiles[filePath] = countAndWatcher with { count = countAndWatcher.count - 1 }; 147watches = [.. _watchedDirectoriesWatches, .. _explicitlyWatchedFiles.Values.Select(v => v.directoryWatch)]; 149_explicitlyWatchedFiles.Clear();