4 implementations of IWatchedFile
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.FileChangeContext.cs (1)
156private sealed class ExplicitlyWatchedFile(FileChangeContext context, string filePath) : IWatchedFile
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
177private sealed class WatchedFile : IWatchedFile
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\ProjectSystem\IFileChangeWatcher.cs (1)
101internal sealed class NoOpWatchedFile : IWatchedFile
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\FileChangeWatcher.cs (1)
478public sealed class RegularWatchedFile : IWatchedFile
35 references to IWatchedFile
Microsoft.CodeAnalysis.LanguageServer (4)
HostWorkspace\FileWatching\DefaultFileChangeWatcher.FileChangeContext.cs (2)
52public IWatchedFile EnqueueWatchingFile(string filePath) 116/// Removes one explicit file watch registration when a returned <see cref="IWatchedFile"/> is disposed.
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
138public IWatchedFile EnqueueWatchingFile(string filePath)
HostWorkspace\LoadedProject.cs (1)
40private IWatchedFile? _mostRecentProjectAssetsFileWatcher;
Microsoft.CodeAnalysis.LanguageServer.UnitTests (25)
DefaultFileChangeWatcherTests.cs (24)
123using var watchedFile = context.EnqueueWatchingFile(filePath); 138using var watchedFile = context.EnqueueWatchingFile(filePath); 153using var watchedFile = context.EnqueueWatchingFile(filePath); 167using var watchedFile = context.EnqueueWatchingFile(filePath); 183using var watchedFile1 = context.EnqueueWatchingFile(Path.Combine(tempDirectory.Path, "a.cs")); 184using var watchedFile2 = context.EnqueueWatchingFile(Path.Combine(tempDirectory.Path, "b.cs")); 204using var watcher1 = context.EnqueueWatchingFile(filePath); 205using var watcher2 = context.EnqueueWatchingFile(filePath); 222using var watchedFile = context.EnqueueWatchingFile(filePath); 235using var watchedFile = context.EnqueueWatchingFile(nonExistentPath); 250using var csWatcher = context.EnqueueWatchingFile(csFilePath); 251using var vbWatcher = context.EnqueueWatchingFile(vbFilePath); 252using var txtWatcher = context.EnqueueWatchingFile(txtFilePath); 273using var watchedFile = context.EnqueueWatchingFile(filePath); 289using var watchedFile = context.EnqueueWatchingFile(filePath); 304using var watchedFile = context.EnqueueWatchingFile(filePath); 319using var watcher1 = context.EnqueueWatchingFile(filePath); 322using var watcher2 = context.EnqueueWatchingFile(filePath); 365var file1 = context1.EnqueueWatchingFile(Path.Combine(root.Path, "extra.txt")); 366var file2 = context2.EnqueueWatchingFile(Path.Combine(root.Path, "extra2.log")); 559using var watchedFile = context.EnqueueWatchingFile(filePath); 582using var watchedFile = context.EnqueueWatchingFile(filePath); 630var watchedFile = context.EnqueueWatchingFile(filePath); 688using var watchedFile = context.EnqueueWatchingFile(filePath);
LspFileChangeWatcherTests.cs (1)
92var watchedFile = context.EnqueueWatchingFile(filePath);
Microsoft.CodeAnalysis.Workspaces (5)
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (2)
37private readonly Dictionary<string, (IWatchedFile Token, int RefCount)> _referenceFileWatchingTokens = []; 120var fileToken = _fileReferenceChangeContext.Value.EnqueueWatchingFile(fullFilePath);
Workspace\ProjectSystem\IFileChangeWatcher.cs (2)
90IWatchedFile EnqueueWatchingFile(string filePath); 103public static readonly IWatchedFile Instance = new NoOpWatchedFile();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
105private readonly Dictionary<DocumentId, IWatchedFile> _documentWatchedFiles = [];
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\FileChangeWatcher.cs (1)
393public IWatchedFile EnqueueWatchingFile(string filePath)