Пример #1
0
 protected TrashCanServiceBase(
     IMountedDriveService mountedDriveService,
     IOperationsService operationsService,
     IPathService pathService)
 {
     _mountedDriveService = mountedDriveService;
     _operationsService   = operationsService;
     _pathService         = pathService;
 }
Пример #2
0
 public DrivesUpdateService(
     IMountedDriveService mountedDriveService,
     IUnmountedDriveService unmountedDriveService,
     DriveServiceConfiguration configuration)
 {
     _mountedDriveService   = mountedDriveService;
     _unmountedDriveService = unmountedDriveService;
     _timer = CreateTimer(configuration);
 }
Пример #3
0
 public MacTrashCanService(
     IMountedDriveService mountedDriveService,
     IOperationsService operationsService,
     IPathService pathService,
     INodeService nodeService,
     IHomeDirectoryProvider homeDirectoryProvider)
     : base(mountedDriveService, operationsService, pathService)
 {
     _pathService           = pathService;
     _nodeService           = nodeService;
     _homeDirectoryProvider = homeDirectoryProvider;
 }
Пример #4
0
 public DriveViewModelFactory(
     IFileSizeFormatter fileSizeFormatter,
     IPathService pathService,
     IFilesOperationsMediator filesOperationsMediator,
     IUnmountedDriveService unmountedDriveService,
     IMountedDriveService mountedDriveService,
     IPlatformService platformService)
 {
     _fileSizeFormatter       = fileSizeFormatter;
     _pathService             = pathService;
     _filesOperationsMediator = filesOperationsMediator;
     _unmountedDriveService   = unmountedDriveService;
     _mountedDriveService     = mountedDriveService;
     _platformService         = platformService;
 }
Пример #5
0
 public MacTrashCanService(
     IMountedDriveService mountedDriveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService,
     IDirectoryService directoryService,
     IHomeDirectoryProvider homeDirectoryProvider)
     : base(mountedDriveService, operationsService, pathService)
 {
     _pathService           = pathService;
     _fileService           = fileService;
     _environmentService    = environmentService;
     _directoryService      = directoryService;
     _homeDirectoryProvider = homeDirectoryProvider;
 }
Пример #6
0
    public WindowsTrashCanService(
        IMountedDriveService mountedDriveService,
        IOperationsService operationsService,
        IPathService pathService,
        IFileService fileService,
        IDateTimeProvider dateTimeProvider,
        IProcessService processService,
        IWindowsRemovedFileMetadataBuilderFactory removedFileMetadataBuilderFactory,
        IWindowsTrashCanNodeNameGenerator trashCanNodeNameGenerator)
        : base(mountedDriveService, operationsService, pathService)
    {
        _pathService      = pathService;
        _fileService      = fileService;
        _dateTimeProvider = dateTimeProvider;
        _removedFileMetadataBuilderFactory = removedFileMetadataBuilderFactory;
        _trashCanNodeNameGenerator         = trashCanNodeNameGenerator;

        InitializeAsync(processService).Forget();
    }
Пример #7
0
 public LinuxTrashCanService(
     IMountedDriveService mountedDriveService,
     IOperationsService operationsService,
     IPathService pathService,
     IFileService fileService,
     IEnvironmentService environmentService,
     IDirectoryService directoryService,
     IDateTimeProvider dateTimeProvider,
     ILinuxRemovedFileMetadataBuilderFactory removedFileMetadataBuilderFactory,
     IHomeDirectoryProvider homeDirectoryProvider)
     : base(mountedDriveService, operationsService, pathService)
 {
     _pathService        = pathService;
     _fileService        = fileService;
     _environmentService = environmentService;
     _directoryService   = directoryService;
     _dateTimeProvider   = dateTimeProvider;
     _removedFileMetadataBuilderFactory = removedFileMetadataBuilderFactory;
     _homeDirectoryProvider             = homeDirectoryProvider;
 }
Пример #8
0
    public DrivesListViewModel(
        IMountedDriveService mountedDriveService,
        IUnmountedDriveService unmountedDriveService,
        IDrivesUpdateService drivesUpdateService,
        IDriveViewModelFactory driveViewModelFactory,
        IApplicationDispatcher applicationDispatcher)
    {
        _mountedDriveService   = mountedDriveService;
        _unmountedDriveService = unmountedDriveService;
        _driveViewModelFactory = driveViewModelFactory;
        _applicationDispatcher = applicationDispatcher;

        _mountedDrivesDictionary   = new Dictionary <DriveModel, IDriveViewModel>();
        _unmountedDrivesDictionary = new Dictionary <UnmountedDriveModel, IDriveViewModel>();

        SubscribeToEvents();
        LoadDrives();

        drivesUpdateService.Start();
    }