4 writes to _currentWatcherCount
Microsoft.CodeAnalysis.LanguageServer (4)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (4)
118
_currentWatcherCount
++;
174
_currentWatcherCount
--;
242
_currentWatcherCount
++;
284
_currentWatcherCount
--;
7 references to _currentWatcherCount
Microsoft.CodeAnalysis.LanguageServer (7)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.cs (7)
206
if (
_currentWatcherCount
< _maxWatcherCount)
248
Contract.ThrowIfFalse(
_currentWatcherCount
<= _maxWatcherCount);
431
var paths = new List<(string path, ImmutableArray<string> filters)>(capacity: watcher.
_currentWatcherCount
);
441
Contract.ThrowIfTrue(paths.Count != watcher.
_currentWatcherCount
, $"{nameof(watcher.
_currentWatcherCount
)} is out of sync with the actual number of watchers.");
442
Contract.ThrowIfTrue(currentWatcherCountPerRoots != watcher.
_currentWatcherCount
, $"{nameof(watcher.
_currentWatcherCount
)} is out of sync with the actual number of watchers in the roots.");