Example #1
0
        public TaskExecutionService(PersistenceService persistenceService, BackupService backupService,
                                    AliasService aliasService, CommandExecutionService commandExecutionService, WindowService windowService)
        {
            _persistenceService      = persistenceService;
            _backupService           = backupService;
            _aliasService            = aliasService;
            _commandExecutionService = commandExecutionService;
            _windowService           = windowService;

            // Delegates
            _webService.AbortChecker       += () => IsAbortPending;
            _archivingService.AbortChecker += () => IsAbortPending;
            _apiService.AbortChecker       += () => IsAbortPending;

            // Events
            _commandExecutionService.FileChangeMade += (sender, args) => _fileChanges.Add(args.FilePath);
            _webService.ProgressChanged             += (sender, args) => UpdateStatus(args.Progress);
            _archivingService.ProgressChanged       += (sender, args) => UpdateStatus(args.Progress);
        }