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