public UnmountedDriveViewModel(
            IUnmountedDriveService unmountedDriveService,
            UnmountedDriveModel unmountedDriveModel)
        {
            _unmountedDriveService = unmountedDriveService;
            _unmountedDriveModel   = unmountedDriveModel;

            MountCommand = ReactiveCommand.Create(Mount);
        }
예제 #2
0
 public DrivesUpdateService(
     IMountedDriveService mountedDriveService,
     IUnmountedDriveService unmountedDriveService,
     DriveServiceConfiguration configuration)
 {
     _mountedDriveService   = mountedDriveService;
     _unmountedDriveService = unmountedDriveService;
     _timer = CreateTimer(configuration);
 }
예제 #3
0
 public DriveViewModelFactory(
     IFileSizeFormatter fileSizeFormatter,
     IPathService pathService,
     IFilesOperationsMediator filesOperationsMediator,
     IUnmountedDriveService unmountedDriveService)
 {
     _fileSizeFormatter       = fileSizeFormatter;
     _pathService             = pathService;
     _filesOperationsMediator = filesOperationsMediator;
     _unmountedDriveService   = unmountedDriveService;
 }
예제 #4
0
        public DriveService(
            IEnvironmentDriveService environmentDriveService,
            IUnmountedDriveService unmountedDriveService,
            DriveServiceConfiguration configuration)
        {
            _environmentDriveService = environmentDriveService;
            _unmountedDriveService   = unmountedDriveService;

            _mountedDrives   = new List <DriveModel>();
            _unmountedDrives = new List <UnmountedDriveModel>();
            _timer           = new Timer(configuration.DrivesListRefreshIntervalMs);

            ReloadDrives();
            SetupTimer();
        }
예제 #5
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();
    }