public DrivesListViewModel( IDriveService driveService, IDriveViewModelFactory driveViewModelFactory, IApplicationDispatcher applicationDispatcher) { _driveService = driveService; _driveViewModelFactory = driveViewModelFactory; _applicationDispatcher = applicationDispatcher; _drives = new ObservableCollection <IDriveViewModel>(); SubscribeToEvents(); ReloadDrives(); }
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(); }