public MusicFileContext(IFileSystemWatcherService fileSystemWatcherService, ITranscodingService transcodingService) { this.musicFilesCache = new ConcurrentDictionary <string, WeakReference <MusicFile> >(); this.runningTranscodingTasks = new ConcurrentDictionary <string, Task>(); this.stopwatch = Stopwatch.StartNew(); fileSystemWatcherService.Renamed += FileSystemWatcherServiceRenamed; fileSystemWatcherService.Deleted += FileSystemWatcherServiceDeleted; transcodingService.TranscodingTaskCreated += TranscodingServiceTranscodingTaskCreated; }
public ManagerController(IShellService shellService, IEnvironmentService environmentService, IMusicFileContext musicFileContext, SelectionService selectionService, ManagerStatusService managerStatusService, IFileSystemWatcherService fileSystemWatcherService, Lazy<ManagerViewModel> managerViewModel) { this.shellService = shellService; this.environmentService = environmentService; this.musicFileContext = musicFileContext; this.selectionService = selectionService; this.managerStatusService = managerStatusService; this.fileSystemWatcherService = fileSystemWatcherService; this.managerViewModel = managerViewModel; this.musicFiles = new ObservableCollection<MusicFile>(); this.updateSubDirectoriesCommand = new DelegateCommand(UpdateSubDirectories); this.navigateDirectoryUpCommand = new DelegateCommand(NavigateDirectoryUp, CanNavigateDirectoryUp); this.navigateHomeCommand = new DelegateCommand(NavigateHome); this.navigatePublicHomeCommand = new DelegateCommand(NavigatePublicHome); this.loadRecursiveCommand = new DelegateCommand(LoadRecursive); this.navigateToSelectedSubDirectoryCommand = new DelegateCommand(NavigateToSelectedSubDirectory); this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties); }
public ManagerController(IShellService shellService, IEnvironmentService environmentService, IMusicFileContext musicFileContext, SelectionService selectionService, ManagerStatusService managerStatusService, IFileSystemWatcherService fileSystemWatcherService, Lazy <ManagerViewModel> managerViewModel) { this.shellService = shellService; this.environmentService = environmentService; this.musicFileContext = musicFileContext; this.selectionService = selectionService; this.managerStatusService = managerStatusService; this.fileSystemWatcherService = fileSystemWatcherService; this.managerViewModel = managerViewModel; this.musicFiles = new ObservableCollection <MusicFile>(); this.updateSubDirectoriesCommand = new DelegateCommand(UpdateSubDirectories); this.navigateDirectoryUpCommand = new DelegateCommand(NavigateDirectoryUp, CanNavigateDirectoryUp); this.navigateHomeCommand = new DelegateCommand(NavigateHome); this.navigatePublicHomeCommand = new DelegateCommand(NavigatePublicHome); this.loadRecursiveCommand = new DelegateCommand(LoadRecursive); this.navigateToSelectedSubDirectoryCommand = new DelegateCommand(NavigateToSelectedSubDirectory); this.showMusicPropertiesCommand = new DelegateCommand(ShowMusicProperties); this.deleteSelectedFilesCommand = new DelegateCommand(DeleteSelectedFiles); }
public UserFileService(IAppFolderService appFolderService, IFileService fileService, IFileSystemWatcherService fileSystemWatcherService, IEncryptionService encryptionService) { _appFolderService = appFolderService; _fileService = fileService; _fileSystemWatcherService = fileSystemWatcherService; _encryptionService = encryptionService; _appFolderPath = _appFolderService.GetAppFolderPath(); string localFolderName = FileLocation.Local.FolderName(); string roamedFolderName = FileLocation.Roamed.FolderName(); var localFolderTask = CreateUserFolderAsync(localFolderName); var roamedFolderTask = CreateUserFolderAsync(roamedFolderName); FilesList = _filesList.AsObservableList(); Initialization = InitializeFileList(); }
public FileService() { _fileSystemWatcherService = new FileSystemWatcherService(); InitializeComponent(); }