8 instantiations of FileSystemWatcher
Microsoft.Build.CommandLine.UnitTests (2)
MSBuildServer_Tests.cs (2)
113using var watcher = new System.IO.FileSystemWatcher(dir!); 194using var watcher = new System.IO.FileSystemWatcher(dir!);
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (2)
46var watcher = new FileSystemWatcher(watchedDirectory.Path); 107_watcher = new FileSystemWatcher(directoryPath, Path.GetFileName(filePath));
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
177watcher = UsePollingFileWatcher && UseActivePolling ? null : new FileSystemWatcher(root);
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
58_watcher = new FileSystemWatcher(directory, file);
Microsoft.VisualStudio.LanguageServices (1)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
72_vsFeedbackSemaphoreFileWatcher = new FileSystemWatcher(vsFeedbackTempDir, VSFeedbackSemaphoreFileName);
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
118dirMon.Fsw = new FileSystemWatcher(dir);
55 references to FileSystemWatcher
Microsoft.Build.CommandLine.UnitTests (2)
MSBuildServer_Tests.cs (2)
113using var watcher = new System.IO.FileSystemWatcher(dir!); 194using var watcher = new System.IO.FileSystemWatcher(dir!);
Microsoft.CodeAnalysis.LanguageServer (6)
HostWorkspace\FileWatching\SimpleFileChangeWatcher.cs (6)
12/// A trivial implementation of <see cref="IFileChangeWatcher" /> that is built atop the framework <see cref="FileSystemWatcher" />. This is used if we can't 30private readonly ImmutableArray<FileSystemWatcher> _directoryFileSystemWatchers; 36var watcherBuilder = ImmutableArray.CreateBuilder<FileSystemWatcher>(watchedDirectories.Length); 46var watcher = new FileSystemWatcher(watchedDirectory.Path); 88foreach (var directoryWatcher in _directoryFileSystemWatchers) 95private readonly FileSystemWatcher? _watcher;
Microsoft.Extensions.FileProviders.Physical (10)
PhysicalFileProvider.cs (3)
82/// By default, <see cref="PhysicalFileProvider"/> uses <see cref="FileSystemWatcher"/> to listen to file change events 83/// for <see cref="Watch(string)"/>. <see cref="FileSystemWatcher"/> is ineffective in some scenarios such as mounted drives. 164FileSystemWatcher? watcher;
PhysicalFilesWatcher.cs (7)
32private readonly FileSystemWatcher? _fileWatcher; 45/// Wraps an instance of <see cref="System.IO.FileSystemWatcher" />. 55FileSystemWatcher? fileSystemWatcher, 63/// Wraps an instance of <see cref="System.IO.FileSystemWatcher" />. 74FileSystemWatcher? fileSystemWatcher, 90throw new PlatformNotSupportedException(SR.Format(SR.FileSystemWatcher_PlatformNotSupported, typeof(FileSystemWatcher))); 124/// <see cref="PhysicalFilesWatcher(string, FileSystemWatcher, bool)" />. Globbing patterns
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
20private FileSystemWatcher _watcher;
Microsoft.VisualStudio.LanguageServices (1)
EditAndContinue\EditAndContinueFeedbackDiagnosticFileProvider.cs (1)
40private readonly FileSystemWatcher? _vsFeedbackSemaphoreFileWatcher;
netstandard (1)
netstandard.cs (1)
927[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileSystemWatcher))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
565[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileSystemWatcher))]
System.IO.FileSystem.Watcher (32)
System\IO\ErrorEventArgs.cs (1)
7/// Provides data for the <see cref='System.IO.FileSystemWatcher.Error'/> event.
System\IO\ErrorEventHandler.cs (2)
8/// handle the <see cref='System.IO.FileSystemWatcher.Error'/> 9/// event of a <see cref='System.IO.FileSystemWatcher'/>.
System\IO\FileSystemEventArgs.cs (3)
7/// Provides data for the directory events: <see cref='System.IO.FileSystemWatcher.Changed'/>, <see cref='System.IO.FileSystemWatcher.Created'/>, <see cref='System.IO.FileSystemWatcher.Deleted'/>.
System\IO\FileSystemEventHandler.cs (4)
7/// Represents the method that will handle the <see cref='System.IO.FileSystemWatcher.Changed'/>, 8/// <see cref='System.IO.FileSystemWatcher.Created'/>, or 9/// <see cref='System.IO.FileSystemWatcher.Deleted'/> event of 10/// a <see cref='System.IO.FileSystemWatcher'/> class.
System\IO\FileSystemWatcher.cs (12)
74/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class. 82/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class, 92/// Initializes a new instance of the <see cref='System.IO.FileSystemWatcher'/> class, 269/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is changed. 284/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is created. 299/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> is deleted. 329/// Occurs when a file or directory in the specified <see cref='System.IO.FileSystemWatcher.Path'/> 475/// Raises the <see cref='System.IO.FileSystemWatcher.Changed'/> event. 483/// Raises the <see cref='System.IO.FileSystemWatcher.Created'/> event. 491/// Raises the <see cref='System.IO.FileSystemWatcher.Deleted'/> event. 511/// Raises the <see cref='System.IO.FileSystemWatcher.Error'/> event. 527/// Raises the <see cref='System.IO.FileSystemWatcher.Renamed'/> event.
System\IO\FileSystemWatcher.Linux.cs (7)
225private readonly WeakReference<FileSystemWatcher> _weakWatcher; 275FileSystemWatcher watcher, SafeFileHandle inotifyHandle, string directoryPath, 282_weakWatcher = new WeakReference<FileSystemWatcher>(watcher); 388if (_weakWatcher.TryGetTarget(out FileSystemWatcher? watcher)) 465if (_weakWatcher.TryGetTarget(out FileSystemWatcher? watcher)) 555FileSystemWatcher? watcher; 771if (_weakWatcher.TryGetTarget(out FileSystemWatcher? watcher))
System\IO\RenamedEventArgs.cs (1)
7/// Provides data for the <see cref='System.IO.FileSystemWatcher.Renamed'/> event.
System\IO\RenamedEventHandler.cs (2)
7/// Represents the method that will handle the <see cref='System.IO.FileSystemWatcher.Renamed'/> event of a <see cref='System.IO.FileSystemWatcher'/> class.
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
27internal FileSystemWatcher Fsw;