public FileSystemSnapshotManager(
            IFileSystemNameFactory fileSystemNameFactory,
            IFileSystem fileSystem,
            IFileRegistrationTracker fileRegistrationTracker,
            IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
            IOperationProcessor operationProcessor,
            IProjectDiscovery projectDiscovery,
            IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
            ITaskQueueFactory taskQueueFactory,
            ILongRunningFileSystemTaskQueue longRunningFileSystemTaskQueue)
        {
            _fileSystemNameFactory          = fileSystemNameFactory;
            _fileSystem                     = fileSystem;
            _fileSystemSnapshotBuilder      = fileSystemSnapshotBuilder;
            _operationProcessor             = operationProcessor;
            _projectDiscovery               = projectDiscovery;
            _longRunningFileSystemTaskQueue = longRunningFileSystemTaskQueue;
            _fileRegistrationTracker        = fileRegistrationTracker;

            _flushPathChangesTaskQueue = taskQueueFactory.CreateQueue("FileSystemSnapshotManager Path Changes Task Queue");
            _taskExecutor = taskQueueFactory.CreateQueue("FileSystemSnapshotManager State Change Task Queue");
            _fileRegistrationTracker.ProjectListChanged += FileRegistrationTrackerOnProjectListChanged;
            _currentSnapshot        = FileSystemSnapshot.Empty;
            _directoryChangeWatcher = directoryChangeWatcherFactory.CreateWatcher(TimeSpan.FromSeconds(60));
            _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
            _directoryChangeWatcher.Error        += DirectoryChangeWatcherOnError;
            _directoryChangeWatcher.Paused       += DirectoryChangeWatcherOnPaused;
            _directoryChangeWatcher.Resumed      += DirectoryChangeWatcherOnResumed;
        }
Ejemplo n.º 2
0
        public FileSystemSnapshotManager(
            IFileSystemNameFactory fileSystemNameFactory,
            IFileSystem fileSystem,
            IFileRegistrationTracker fileRegistrationTracker,
            IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
            IOperationProcessor operationProcessor,
            IProjectDiscovery projectDiscovery,
            IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
            ITaskQueueFactory taskQueueFactory,
            ILongRunningFileSystemTaskQueue longRunningFileSystemTaskQueue)
        {
            _fileSystemNameFactory          = fileSystemNameFactory;
            _fileSystem                     = fileSystem;
            _fileSystemSnapshotBuilder      = fileSystemSnapshotBuilder;
            _operationProcessor             = operationProcessor;
            _projectDiscovery               = projectDiscovery;
            _longRunningFileSystemTaskQueue = longRunningFileSystemTaskQueue;
            _fileRegistrationTracker        = fileRegistrationTracker;

            _flushPathChangesTaskQueue = taskQueueFactory.CreateQueue("FileSystemSnapshotManager Path Changes Task Queue");
            _fileRegistrationTracker.ProjectListChanged   += FileRegistrationTrackerOnProjectListChanged;
            _fileRegistrationTracker.ProjectListRefreshed += FileRegistrationTrackerOnProjectListRefreshed;
            _fileSystemSnapshot     = FileSystemSnapshot.Empty;
            _directoryChangeWatcher = directoryChangeWatcherFactory.CreateWatcher();
            _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
            _directoryChangeWatcher.Error        += DirectoryChangeWatcherOnError;
        }
Ejemplo n.º 3
0
 public FileSystemProcessor(
     IFileSystemNameFactory fileSystemNameFactory,
     IProjectDiscovery projectDiscovery,
     IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
     ITaskQueueFactory taskQueueFactory,
     IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
     IOperationProcessor <SnapshotComputedEventArgs> snapshotOperationProcessor)
 {
     _fileSystemNameFactory      = fileSystemNameFactory;
     _directoryChangeWatcher     = directoryChangeWatcherFactory.CreateWatcher();
     _fileSystemSnapshotBuilder  = fileSystemSnapshotBuilder;
     _snapshotOperationProcessor = snapshotOperationProcessor;
     _projectDiscovery           = projectDiscovery;
     _taskQueue = taskQueueFactory.CreateQueue();
     _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
     _fileSystemSnapshot = FileSystemTreeSnapshot.Empty;
 }
 public FileSystemProcessor(
     IFileSystemNameFactory fileSystemNameFactory,
     IProjectDiscovery projectDiscovery,
     IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
     ITaskQueueFactory taskQueueFactory,
     IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
     IOperationProcessor<SnapshotComputedEventArgs> snapshotOperationProcessor)
 {
     _fileSystemNameFactory = fileSystemNameFactory;
       _directoryChangeWatcher = directoryChangeWatcherFactory.CreateWatcher();
       _fileSystemSnapshotBuilder = fileSystemSnapshotBuilder;
       _snapshotOperationProcessor = snapshotOperationProcessor;
       _projectDiscovery = projectDiscovery;
       _taskQueue = taskQueueFactory.CreateQueue();
       _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
       _fileSystemSnapshot = FileSystemTreeSnapshot.Empty;
 }
        public FileSystemProcessor(
            IFileSystemNameFactory fileSystemNameFactory,
            IFileSystem fileSystem,
            IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
            IOperationProcessor operationProcessor,
            IProjectDiscovery projectDiscovery,
            IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
            ITaskQueueFactory taskQueueFactory)
        {
            _fileSystemNameFactory = fileSystemNameFactory;
              _fileSystem = fileSystem;
              _fileSystemSnapshotBuilder = fileSystemSnapshotBuilder;
              _operationProcessor = operationProcessor;
              _projectDiscovery = projectDiscovery;

              _taskQueue = taskQueueFactory.CreateQueue("FileSystemProcessor Task Queue");
              _fileSystemSnapshot = FileSystemTreeSnapshot.Empty;
              _directoryChangeWatcher = directoryChangeWatcherFactory.CreateWatcher();
              _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
        }
Ejemplo n.º 6
0
        public FileSystemProcessor(
            IFileSystemNameFactory fileSystemNameFactory,
            IFileSystem fileSystem,
            IFileSystemSnapshotBuilder fileSystemSnapshotBuilder,
            IOperationProcessor operationProcessor,
            IProjectDiscovery projectDiscovery,
            IDirectoryChangeWatcherFactory directoryChangeWatcherFactory,
            ITaskQueueFactory taskQueueFactory)
        {
            _fileSystemNameFactory     = fileSystemNameFactory;
            _fileSystem                = fileSystem;
            _fileSystemSnapshotBuilder = fileSystemSnapshotBuilder;
            _operationProcessor        = operationProcessor;
            _projectDiscovery          = projectDiscovery;

            _taskQueue              = taskQueueFactory.CreateQueue("FileSystemProcessor Task Queue");
            _fileSystemSnapshot     = FileSystemTreeSnapshot.Empty;
            _directoryChangeWatcher = directoryChangeWatcherFactory.CreateWatcher();
            _directoryChangeWatcher.PathsChanged += DirectoryChangeWatcherOnPathsChanged;
            _directoryChangeWatcher.Error        += DirectoryChangeWatcherOnError;
        }