Constructor SkillWatcher
SkillWatcher(SkillRegistry, IEnumerable<string>, TimeSpan?)
Initializes a new instance of the SkillWatcher class.
public SkillWatcher(SkillRegistry registry, IEnumerable<string> directories, TimeSpan? debounceDelay = null)
Parameters
registrySkillRegistryThe skill registry to update when changes are detected.
directoriesIEnumerable<string>The directories to watch for skill changes.
debounceDelayTimeSpan?The delay before processing file changes. Defaults to DefaultDebounceDelay.
Examples
Creating a watcher for multiple directories:
var registry = new SkillRegistry();
var directories = new[] { "./skills", "./plugins" };
using var watcher = new SkillWatcher(registry, directories);
watcher.Start();
Exceptions
- ArgumentNullException
Thrown when
registryordirectoriesisnull.
SkillWatcher(SkillRegistry, string, TimeSpan?)
Initializes a new instance of the SkillWatcher class for a single directory.
public SkillWatcher(SkillRegistry registry, string directory, TimeSpan? debounceDelay = null)
Parameters
registrySkillRegistryThe skill registry to update when changes are detected.
directorystringThe directory to watch for skill changes.
debounceDelayTimeSpan?The delay before processing file changes. Defaults to DefaultDebounceDelay.