IFileWatchAware
Pennington.Infrastructure
The single contract for anything that reacts to file-system changes. Implementers declare the directories they need watched and how they respond to a change; FileWatchDispatcher owns every IFileWatcher call.
Properties
WatchScopesIReadOnlyList<FileWatchScope>- Directories needing an OS-level watcher. Empty (the default) for aggregators that ride notifications other watchers already produce.
Methods
OnFileChanged
#public FileWatchResponse OnFileChanged(FileChangeNotification change)
Called on the file-watcher thread for every watched change. Must be quick and thread-safe.
Parameters
changeFileChangeNotification
Returns
FileWatchResponsePennington.Infrastructure.IFileWatchAware
namespace Pennington.Infrastructure;
/// The single contract for anything that reacts to file-system changes. Implementers declare the directories they need watched and how they respond to a change; FileWatchDispatcher owns every IFileWatcher call.
public interface IFileWatchAware
{
/// Called on the file-watcher thread for every watched change. Must be quick and thread-safe.
public FileWatchResponse OnFileChanged(FileChangeNotification change)
;
/// Directories needing an OS-level watcher. Empty (the default) for aggregators that ride notifications other watchers already produce.
public IReadOnlyList<FileWatchScope> WatchScopes { get; }
}