9 instantiations of FileItem
dotnet-watch (3)
Build\EvaluationResult.cs (1)
150fileItems.Add(filePath, new FileItem
HotReload\HotReloadDotNetWatcher.cs (1)
438new FileItem() { FilePath = changedPath.Path, ContainingProjectPaths = [] },
Watch\MsBuildFileSetFactory.cs (1)
103fileItems.Add(filePath, new FileItem
dotnet-watch.Tests (6)
Watch\BuildEvaluatorTests.cs (6)
46await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Test.csproj", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); 64await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); 84await evaluator.EvaluateAsync(changedFile: new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None); 99{ "Controlller.cs", new FileItem { FilePath = "Controlller.cs", ContainingProjectPaths = []} }, 100{ "Proj.csproj", new FileItem { FilePath = "Proj.csproj", ContainingProjectPaths = [] } }, 121await evaluator.EvaluateAsync(new(new() { FilePath = "Controller.cs", ContainingProjectPaths = [] }, ChangeKind.Update), CancellationToken.None);
22 references to FileItem
dotnet-watch (18)
Build\BuildReporter.cs (2)
22public void ReportWatchedFiles(Dictionary<string, FileItem> fileItems) 28foreach (var file in fileItems.Values)
Build\EvaluationResult.cs (4)
10internal sealed class EvaluationResult(IReadOnlyDictionary<string, FileItem> files, ProjectGraph projectGraph) 12public readonly IReadOnlyDictionary<string, FileItem> Files = files; 87var fileItems = new Dictionary<string, FileItem>(); 148if (!fileItems.TryGetValue(filePath, out var existingFile))
FileWatcher\ChangeKind.cs (1)
13internal readonly record struct ChangedFile(FileItem Item, ChangeKind Kind);
FileWatcher\FileWatcher.cs (1)
169public async Task<ChangedFile?> WaitForFileChangeAsync(IReadOnlyDictionary<string, FileItem> fileSet, Action? startedWatching, CancellationToken cancellationToken)
HotReload\CompilationHandler.cs (1)
485var file = changedFile.Item;
HotReload\HotReloadDotNetWatcher.cs (2)
428if (evaluationResult.Files.TryGetValue(changedPath.Path, out var existingFileItem)) 473.Select(f => evaluationResult.Files.TryGetValue(f.Item.FilePath, out var evaluatedFile) ? f with { Item = evaluatedFile } : f)
HotReload\ScopedCssFileHandler.cs (1)
21var file = files[i].Item;
HotReload\StaticFileHandler.cs (1)
20var file = files[i].Item;
Watch\BuildEvaluator.cs (1)
112private bool RequiresMSBuildRevaluation(FileItem? changedFile)
Watch\MsBuildFileSetFactory.cs (4)
33internal sealed class EvaluationResult(IReadOnlyDictionary<string, FileItem> files, ProjectGraph? projectGraph) 35public readonly IReadOnlyDictionary<string, FileItem> Files = files; 86var fileItems = new Dictionary<string, FileItem>(); 101if (!fileItems.TryGetValue(filePath, out var existingFile))
dotnet-watch.Tests (4)
Build\EvaluationTests.cs (2)
19private static IEnumerable<string> Inspect(string rootDir, IReadOnlyDictionary<string, FileItem> files) 558IEnumerable<(string relativePath, string? staticAssetUrl)> Inspect(IReadOnlyDictionary<string, FileItem> files)
Watch\BuildEvaluatorTests.cs (2)
10private static readonly MSBuildFileSetFactory.EvaluationResult s_emptyEvaluationResult = new(new Dictionary<string, FileItem>(), projectGraph: null); 97new Dictionary<string, FileItem>()