public DirectoryWatchdog(string directoryPath, string filter, IWatchdogThread watchdogThread) { if (directoryPath == null) { throw new ArgumentNullException(nameof(directoryPath)); } _directoryPath = directoryPath; _filter = filter; _watchdogThread = watchdogThread; _filterRegex = GetFilterRegex(filter); if (directoryPath == null) { throw new ArgumentNullException(nameof(directoryPath)); } if (!Directory.Exists(directoryPath)) { throw new InvalidOperationException($"Directory {directoryPath} does not exist"); } _watcher = new FileSystemWatcher(directoryPath, filter) { IncludeSubdirectories = true }; _watcher.Created += OnCreated; _watcher.Renamed += OnRenamed; _watcher.Changed += OnChanged; _watcher.Deleted += OnDeleted; }
public SynchronizerEngine ( IWatchdogThread watchdogThread, IControllerFactory controllerFactory, IConfigurationReader configurationReader, IHealthChecker healthChecker ) : base(watchdogThread, controllerFactory) { _configurationReader = configurationReader; _healthChecker = healthChecker; }
public NodeEngine(IWatchdogThread watchdogThread, IControllerFactory controllerFactory, IConfigurationReader configurationReader) : base(watchdogThread, controllerFactory) { _configurationReader = configurationReader; }
protected Engine(IWatchdogThread watchdogThread, IControllerFactory controllerFactory) { _watchdogThread = watchdogThread; _controllerFactory = controllerFactory; }
public EngineTester(IWatchdogThread watchdogThread, IControllerFactory controllerFactory, RestConfiguration restConfiguration) : base(watchdogThread, controllerFactory) { _restConfiguration = restConfiguration; }