49 references to ChangeKind
Microsoft.DotNet.HotReload.Watch (49)
Build\FilePathExclusions.cs (1)
85
internal bool IsExcluded(string fullPath,
ChangeKind
changeKind, ILogger logger)
FileWatcher\ChangeKind.cs (6)
17
public static HotReloadFileChangeKind Convert(this
ChangeKind
changeKind) =>
20
ChangeKind
.Update => HotReloadFileChangeKind.Update,
21
ChangeKind
.Add => HotReloadFileChangeKind.Add,
22
ChangeKind
.Delete => HotReloadFileChangeKind.Delete,
27
internal readonly record struct ChangedFile(FileItem Item,
ChangeKind
Kind);
29
internal readonly record struct ChangedPath(string Path,
ChangeKind
Kind);
FileWatcher\DirectoryWatcher.cs (1)
23
protected void NotifyChange(string fullPath,
ChangeKind
kind)
FileWatcher\EventBasedDirectoryWatcher.cs (7)
69
NotifyChange(oldLocation,
ChangeKind
.Delete);
70
NotifyChange(newLocation,
ChangeKind
.Add);
75
NotifyChange(e.OldFullPath,
ChangeKind
.Delete);
76
NotifyChange(e.FullPath,
ChangeKind
.Add);
97
NotifyChange(e.FullPath,
ChangeKind
.Delete);
117
NotifyChange(e.FullPath,
ChangeKind
.Update);
136
NotifyChange(e.FullPath,
ChangeKind
.Add);
FileWatcher\PollingDirectoryWatcher.cs (5)
20
private 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);
176
private void NotifyChanges(Dictionary<string,
ChangeKind
> changes)
HotReload\HotReloadDotNetWatcher.cs (23)
247
if (changedFilesAccumulator.Any(change => change.Kind is
ChangeKind
.Add or
ChangeKind
.Delete))
362
var
changeKind = changedPath.Kind ==
ChangeKind
.Add ?
ChangeKind
.Update : changedPath.Kind;
581
if (changedFile.Kind is
ChangeKind
.Add)
864
if (item.Kind ==
ChangeKind
.Add)
871
lastUpdate ??= item with { Kind =
ChangeKind
.Update };
878
else if (item.Kind ==
ChangeKind
.Delete)
894
else if (item.Kind ==
ChangeKind
.Update)
915
Report(kind:
ChangeKind
.Add);
916
Report(kind:
ChangeKind
.Update);
917
Report(kind:
ChangeKind
.Delete);
919
void Report(
ChangeKind
kind)
928
string GetMessage(IReadOnlyList<ChangedFile> items,
ChangeKind
kind)
933
static string GetSingularMessage(
ChangeKind
kind)
936
ChangeKind
.Update => "File updated",
937
ChangeKind
.Add => "File added",
938
ChangeKind
.Delete => "File deleted",
942
static string GetPluralMessage(
ChangeKind
kind)
945
ChangeKind
.Update => "Files updated",
946
ChangeKind
.Add => "Files added",
947
ChangeKind
.Delete => "Files deleted",
UI\IReporter.cs (6)
242
public static readonly MessageDescriptor<(string,
ChangeKind
, string)> IgnoringChangeInHiddenDirectory = Create<(string,
ChangeKind
, string)>("Ignoring change in hidden directory '{0}': {1} '{2}'", Emoji.Watch, LogLevel.Trace);
243
public static readonly MessageDescriptor<(
ChangeKind
, string)> IgnoringChangeInOutputDirectory = Create<(
ChangeKind
, string)>("Ignoring change in output directory: {0} '{1}'", Emoji.Watch, LogLevel.Trace);
244
public 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);