4 instantiations of WatcherOperation
Microsoft.VisualStudio.LanguageServices (4)
ProjectSystem\FileChangeWatcher.cs (4)
213=> new(Kind.WatchDirectory, directory, filters, sink, cookies); 219=> new(Kind.WatchFiles, new OneOrMany<string>(files), fileChangeFlags, sink, new OneOrMany<Context.RegularWatchedFile>(tokens)); 222=> new(Kind.UnwatchDirectories, cookies); 225=> new(Kind.UnwatchFiles, new OneOrMany<Context.RegularWatchedFile>(tokens));
22 references to WatcherOperation
Microsoft.VisualStudio.LanguageServices (22)
ProjectSystem\FileChangeWatcher.cs (22)
41private readonly AsyncBatchingWorkQueue<WatcherOperation> _taskQueue; 51_taskQueue = new AsyncBatchingWorkQueue<WatcherOperation>( 58private async ValueTask ProcessBatchAsync(ImmutableSegmentedList<WatcherOperation> operations, CancellationToken cancellationToken) 66var combinedOp = WatcherOperation.CombineRange(operations, startIndex, combinableEndIndex); 75static int FindCombinableRange(ImmutableSegmentedList<WatcherOperation> operations, int startIndex) 212public static WatcherOperation WatchDirectory(string directory, ImmutableArray<string> filters, IVsFreeThreadedFileChangeEvents2 sink, List<uint> cookies) 215public static WatcherOperation WatchFile(string path, _VSFILECHANGEFLAGS fileChangeFlags, IVsFreeThreadedFileChangeEvents2 sink, Context.RegularWatchedFile token) 218public static WatcherOperation WatchFiles(ImmutableArray<string> files, _VSFILECHANGEFLAGS fileChangeFlags, IVsFreeThreadedFileChangeEvents2 sink, ImmutableArray<Context.RegularWatchedFile> tokens) 221public static WatcherOperation UnwatchDirectories(List<uint> cookies) 224public static WatcherOperation UnwatchFiles(ImmutableArray<Context.RegularWatchedFile> tokens) 227public static WatcherOperation UnwatchFile(Context.RegularWatchedFile token) 231/// Combines <see cref="WatcherOperation"/> instances between <paramref name="start"/> and <paramref name="end"/> 239public static WatcherOperation CombineRange(ImmutableSegmentedList<WatcherOperation> operations, int start, int end) 290public bool CanCombineWith(in WatcherOperation other) 367var item = WatcherOperation.WatchDirectory( 389_fileChangeWatcher._taskQueue.AddWork(WatcherOperation.UnwatchDirectories(_directoryWatchCookies)); 390_fileChangeWatcher._taskQueue.AddWork(WatcherOperation.UnwatchFiles([.. _activeFileWatchingTokens])); 406_fileChangeWatcher._taskQueue.AddWork(WatcherOperation.WatchFile(filePath, _VSFILECHANGEFLAGS.VSFILECHG_Size | _VSFILECHANGEFLAGS.VSFILECHG_Time, this, token)); 418_fileChangeWatcher._taskQueue.AddWork(WatcherOperation.UnwatchFile(watchedFile));