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)
247if (changedFilesAccumulator.Any(change => change.Kind is ChangeKind.Add or ChangeKind.Delete)) 362var changeKind = changedPath.Kind == ChangeKind.Add ? ChangeKind.Update : changedPath.Kind; 581if (changedFile.Kind is ChangeKind.Add) 864if (item.Kind == ChangeKind.Add) 871lastUpdate ??= item with { Kind = ChangeKind.Update }; 878else if (item.Kind == ChangeKind.Delete) 894else if (item.Kind == ChangeKind.Update) 915Report(kind: ChangeKind.Add); 916Report(kind: ChangeKind.Update); 917Report(kind: ChangeKind.Delete); 919void Report(ChangeKind kind) 928string GetMessage(IReadOnlyList<ChangedFile> items, ChangeKind kind) 933static string GetSingularMessage(ChangeKind kind) 936ChangeKind.Update => "File updated", 937ChangeKind.Add => "File added", 938ChangeKind.Delete => "File deleted", 942static string GetPluralMessage(ChangeKind kind) 945ChangeKind.Update => "Files updated", 946ChangeKind.Add => "Files added", 947ChangeKind.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);