public AdaptiveFileSystemWatch(IFileSystemWatchWrapperFactory watchWrapperFactory, IFileSystem fileSystem,
                                       string path, bool recursive = false, string filter = null)
        {
            this.watchWrapperFactory = watchWrapperFactory;
            this.fileSystem          = fileSystem;
            this.recursive           = recursive;
            watch = watchWrapperFactory.CreateWatch(path, false, filter);
            watch.AddListener(this);

            if (recursive)
            {
                ScanChildPaths(path);
            }
        }
 public FileSystemWatchFactory(IEnvironment environment,
                               IFileSystemWatchWrapperFactory fileSystemWatchWrapperFactory, IFileSystem fileSystem)
 {
     this.fileSystemWatchWrapperFactory = fileSystemWatchWrapperFactory;
     this.fileSystem = fileSystem;
     if (environment.IsWindows)
     {
         strategy = new DefaultStrategy(this);
     }
     else
     {
         strategy = new AdaptiveStrategy(this);
     }
 }
 public DefaultFileSystemWatch(IFileSystemWatchWrapperFactory watchWrapperFactory, string path, bool recursive = false, string filter = null)
 {
     watch = watchWrapperFactory.CreateWatch(path, recursive, filter);
     watch.AddListener(this);
 }