2 writes to _watcher
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
107
_watcher
= new FileSystemWatcher(directoryPath, Path.GetFileName(filePath));
119
_watcher
= null;
12 references to _watcher
Microsoft.CodeAnalysis.LanguageServer (12)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (12)
108
_watcher
.IncludeSubdirectories = false;
110
_watcher
.Changed += _context.RaiseEvent;
111
_watcher
.Created += _context.RaiseEvent;
112
_watcher
.Deleted += _context.RaiseEvent;
113
_watcher
.Renamed += _context.RaiseEvent;
115
_watcher
.EnableRaisingEvents = true;
125
if (_context._individualWatchedFiles.Remove(this) &&
_watcher
!= null)
127
_watcher
.Changed -= _context.RaiseEvent;
128
_watcher
.Created -= _context.RaiseEvent;
129
_watcher
.Deleted -= _context.RaiseEvent;
130
_watcher
.Renamed -= _context.RaiseEvent;
131
_watcher
.Dispose();