public DeploymentViewModel(IDeviceProvider deviceProvider, IWindowsOptionsProvider optionsProvider, IWoaDeployer deployer, UIServices uiServices, AdvancedViewModel advancedViewModel, WimPickViewModel wimPickViewModel, ILowLevelApi lowLevelApi) { this.optionsProvider = optionsProvider; this.deployer = deployer; this.uiServices = uiServices; this.advancedViewModel = advancedViewModel; this.wimPickViewModel = wimPickViewModel; var isSelectedWim = wimPickViewModel.WhenAnyObservable(x => x.WimMetadata.SelectedImageObs) .Select(metadata => metadata != null); FullInstallWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(Deploy, isSelectedWim), uiServices.Dialog); IsBusyObservable = FullInstallWrapper.Command.IsExecuting; isBusy = IsBusyObservable.ToProperty(this, model => model.IsBusy); RefreshDisksCommandWrapper = new CommandWrapper <Unit, ICollection <Disk> >(this, ReactiveCommand.CreateFromTask(lowLevelApi.GetDisks), uiServices.Dialog); disks = RefreshDisksCommandWrapper.Command .Select(x => x.Select(disk => new DiskViewModel(disk))) .ToProperty(this, x => x.Disks); this.WhenAnyValue(x => x.SelectedDisk).Where(x => x != null).Subscribe(x => deviceProvider.Device = new RaspberryPi(lowLevelApi, x.Disk)); }
public AdvancedViewModel(ISettingsService settingsService, IFileSystemOperations fileSystemOperations, UIServices uiServices, IProviderBasedWindowsDeployer deployer, IDiskLayoutPreparer preparer, IWindowsOptionsProvider optionsProvider, IDeviceProvider deviceProvider, IDownloadProgress progress, StatusViewModel statusViewModel, IPhone phone) { StatusViewModel = statusViewModel; this.settingsService = settingsService; this.uiServices = uiServices; this.deployer = deployer; this.preparer = preparer; this.optionsProvider = optionsProvider; this.deviceProvider = deviceProvider; this.progress = progress; this.phone = phone; sizeReservedForWindows = this.WhenAnyValue(x => x.GbsReservedForWindows, ByteSize.FromGigaBytes) .ToProperty(this, x => x.SizeReservedForWindows); DeleteDownloadedWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(() => DeleteDownloaded(fileSystemOperations)), uiServices.Dialog); ForceDualBootWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(ForceDualBoot), uiServices.Dialog); ForceDisableDualBootWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(ForceDisableDualBoot), uiServices.Dialog); BackupCommandWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(Backup), uiServices.Dialog); RestoreCommandWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(Restore), uiServices.Dialog); IsBusyObservable = Observable.Merge(new [] { DeleteDownloadedWrapper.Command.IsExecuting, BackupCommandWrapper.Command.IsExecuting, RestoreCommandWrapper.Command.IsExecuting, ForceDualBootWrapper.Command.IsExecuting, ForceDisableDualBootWrapper.Command.IsExecuting, }); }
public WindowsDeployer(IWindowsOptionsProvider optionsProvider, IPhone phone, IWindowsImageService imageService, IBootCreator bootCreator, IEnumerable <ISpaceAllocator> spaceAllocators, IObserver <double> progressObserver) { this.optionsProvider = optionsProvider; this.phone = phone; this.imageService = imageService; this.bootCreator = bootCreator; this.spaceAllocators = spaceAllocators; this.progressObserver = progressObserver; }
public LumiaDiskLayoutPreparer(IWindowsOptionsProvider optionsProvider, IFileSystemOperations fileOperations, IEnumerable <ISpaceAllocator <IPhone> > spaceAllocators, IPartitionCleaner cleaner, IPhone phone) { this.optionsProvider = optionsProvider; this.fileOperations = fileOperations; this.spaceAllocators = spaceAllocators; this.cleaner = cleaner; this.phone = phone; }
public DeploymentViewModel( IWindowsOptionsProvider optionsProvider, IWoaDeployer deployer, UIServices uiServices, AdvancedViewModel advancedViewModel, WimPickViewModel wimPickViewModel) { this.optionsProvider = optionsProvider; this.deployer = deployer; this.uiServices = uiServices; this.advancedViewModel = advancedViewModel; this.wimPickViewModel = wimPickViewModel; var isSelectedWim = wimPickViewModel.WhenAnyObservable(x => x.WimMetadata.SelectedImageObs) .Select(metadata => metadata != null); FullInstallWrapper = new CommandWrapper <Unit, Unit>(this, ReactiveCommand.CreateFromTask(Deploy, isSelectedWim), uiServices.Dialog); IsBusyObservable = FullInstallWrapper.Command.IsExecuting; isBusyHelper = IsBusyObservable.ToProperty(this, model => model.IsBusy); }
public ProviderBasedWindowsDeployer(IWindowsOptionsProvider optionsProvider, IDeviceProvider deviceProvider, IWindowsDeployer deployer) { this.optionsProvider = optionsProvider; this.deviceProvider = deviceProvider; this.deployer = deployer; }
public LumiaDisklayoutPreparer(IWindowsOptionsProvider optionsProvider, IEnumerable <ISpaceAllocator <IPhone> > spaceAllocators, IPhone phone) { this.optionsProvider = optionsProvider; this.spaceAllocators = spaceAllocators; this.phone = phone; }