49 references to ChangeKind
Microsoft.DotNet.HotReload.Watch (49)
Build\FilePathExclusions.cs (1)
85internal bool IsExcluded(string fullPath, ChangeKind changeKind, ILogger logger)
FileWatcher\ChangeKind.cs (6)
17public static HotReloadFileChangeKind Convert(this ChangeKind changeKind) => 20ChangeKind.Update => HotReloadFileChangeKind.Update, 21ChangeKind.Add => HotReloadFileChangeKind.Add, 22ChangeKind.Delete => HotReloadFileChangeKind.Delete, 27internal readonly record struct ChangedFile(FileItem Item, ChangeKind Kind); 29internal readonly record struct ChangedPath(string Path, ChangeKind Kind);
FileWatcher\DirectoryWatcher.cs (1)
23protected void NotifyChange(string fullPath, ChangeKind kind)
FileWatcher\EventBasedDirectoryWatcher.cs (7)
69NotifyChange(oldLocation, ChangeKind.Delete); 70NotifyChange(newLocation, ChangeKind.Add); 75NotifyChange(e.OldFullPath, ChangeKind.Delete); 76NotifyChange(e.FullPath, ChangeKind.Add); 97NotifyChange(e.FullPath, ChangeKind.Delete); 117NotifyChange(e.FullPath, ChangeKind.Update); 136NotifyChange(e.FullPath, ChangeKind.Add);
FileWatcher\PollingDirectoryWatcher.cs (5)
20private readonly Dictionary<string, ChangeKind> _changesBuilder = new(PathUtilities.OSSpecificPathComparer); 103_changesBuilder.TryAdd(filePath, ChangeKind.Add); 107_changesBuilder.TryAdd(filePath, ChangeKind.Update); 117_changesBuilder.TryAdd(filePath, ChangeKind.Delete); 176private void NotifyChanges(Dictionary<string, ChangeKind> changes)
HotReload\HotReloadDotNetWatcher.cs (23)
242if (changedFilesAccumulator.Any(change => change.Kind is ChangeKind.Add or ChangeKind.Delete)) 346var changeKind = changedPath.Kind == ChangeKind.Add ? ChangeKind.Update : changedPath.Kind; 566if (changedFile.Kind is ChangeKind.Add) 849if (item.Kind == ChangeKind.Add) 856lastUpdate ??= item with { Kind = ChangeKind.Update }; 863else if (item.Kind == ChangeKind.Delete) 879else if (item.Kind == ChangeKind.Update) 900Report(kind: ChangeKind.Add); 901Report(kind: ChangeKind.Update); 902Report(kind: ChangeKind.Delete); 904void Report(ChangeKind kind) 913string GetMessage(IReadOnlyList<ChangedFile> items, ChangeKind kind) 918static string GetSingularMessage(ChangeKind kind) 921ChangeKind.Update => "File updated", 922ChangeKind.Add => "File added", 923ChangeKind.Delete => "File deleted", 927static string GetPluralMessage(ChangeKind kind) 930ChangeKind.Update => "Files updated", 931ChangeKind.Add => "Files added", 932ChangeKind.Delete => "Files deleted",
UI\IReporter.cs (6)
242public static readonly MessageDescriptor<(string, ChangeKind, string)> IgnoringChangeInHiddenDirectory = Create<(string, ChangeKind, string)>("Ignoring change in hidden directory '{0}': {1} '{2}'", Emoji.Watch, LogLevel.Trace); 243public static readonly MessageDescriptor<(ChangeKind, string)> IgnoringChangeInOutputDirectory = Create<(ChangeKind, string)>("Ignoring change in output directory: {0} '{1}'", Emoji.Watch, LogLevel.Trace); 244public static readonly MessageDescriptor<(string, ChangeKind, string, string, string)> IgnoringChangeInExcludedFile = Create<(string, ChangeKind, string, string, string)>("Ignoring change in excluded file '{0}': {1}. Path matches {2} glob '{3}' set in '{4}'.", Emoji.Watch, LogLevel.Trace);