public BackupsViewModel(IRegionManager regionManager, IDataAccess dataAccess, IEventAggregator eventAggregator, IBackupService backupService, IGoogleDrive googleDrive, ISnackbarMessageQueue messageQueue) : base(regionManager, eventAggregator) { _dataAccess = dataAccess; _backupService = backupService; _googleDrive = googleDrive; _messageQueue = messageQueue; _eventAggregator.GetEvent <BackupListUpdateRequestedEvent>().Subscribe(UpdateBackups); RefreshCommand = new DelegateCommand(UpdateBackups); AddCommand = new DelegateCommand(Add); RemoveCommand = new DelegateCommand <BackupModel>(Remove, x => SelectedBackup is object).ObservesProperty(() => SelectedBackup); RemoveSelectedCommand = new DelegateCommand(RemoveSelected, () => IsAllItemsSelected ?? true).ObservesProperty(() => IsAllItemsSelected); RestoreCommand = new DelegateCommand <BackupModel>(Restore, x => SelectedBackup is object).ObservesProperty(() => SelectedBackup); NavigateForwardCommand = new DelegateCommand(() => ++ CurrentPageIndex, () => To < TotalNumberOfBackups); NavigateBackwardCommand = new DelegateCommand(() => -- CurrentPageIndex, () => From > 1); NavigateToStartCommand = new DelegateCommand(() => CurrentPageIndex = 0, () => From > 1); NavigateToEndCommand = new DelegateCommand(() => CurrentPageIndex = TotalNumberOfBackups / PageSize, () => To < TotalNumberOfBackups); ShowInExplorerCommand = new DelegateCommand <BackupModel>(ShowInExplorer, x => SelectedBackup is object).ObservesProperty(() => SelectedBackup); UpdateNoteCommand = new DelegateCommand <BackupModel>(x => _dataAccess.UpdateNote(SelectedBackup.Backup)); UpdateIsLikedCommand = new DelegateCommand <BackupModel>(x => _dataAccess.UpdateIsLiked(SelectedBackup.Backup)); ExecuteDriveActionCommand = new DelegateCommand <BackupModel>(x => ExecuteCloudAction(SelectedBackup, Ct).ConfigureAwait(false), x => SelectedBackup is object && _googleDrive.IsAuthorized).ObservesProperty(() => SelectedBackup); RecoverCommand = new DelegateCommand <BackupModel>(x => RecoverAsync(x, Ct).ConfigureAwait(false), x => SelectedBackup is object && SelectedBackup.IsInGoogleDrive && !File.Exists(SelectedBackup.Backup.SavefilePath) && _googleDrive.IsAuthorized).ObservesProperty(() => SelectedBackup); Filter.PropertyChanged += (s, e) => OnFilterPropertyChanged(e.PropertyName); }
public GoogleDriveViewModel(IGoogleDrive googleDrive, IEventAggregator eventAggregator, IRegionManager regionManager) : base(regionManager, eventAggregator) { _googleDrive = googleDrive; AuthorizeCommand = new DelegateCommand(() => AuthorizeAsync(Ct).ConfigureAwait(false)); ReauthorizeCommand = new DelegateCommand(() => ReauthorizeAsync(Ct).ConfigureAwait(false)); UpdateUserEmailCommand = new DelegateCommand(() => UpdateUserEmailAsync(Ct).ConfigureAwait(false)); CancelCommand = new DelegateCommand(() => _cts?.Cancel()); // TODO: NEVER USED! }
public CadastroMensagemService( IUnitOfWork unitOfWork, IGoogleDrive googleDriveServices, IArquivosPasta arquivosPasta, IMapper mapper ) { _unitOfWork = unitOfWork; _googleDriveServices = googleDriveServices; _arquivosPasta = arquivosPasta; _mapper = mapper; }
public GoogleAppsScript(IGoogleDrive googleDrive) { _googleAuth = new GoogleAuthorizer(); _googleDrive = googleDrive; }
public GoogleGDrivePolling(IGoogleDrive googleDrive, IHubEventReporter reporter) { _googleDrive = googleDrive; _reporter = reporter; }
public GoogleSheet(IGoogleIntegration googleIntegration, IGoogleDrive googleDrive) { _googleIntegration = googleIntegration; _googleDrive = googleDrive; }
public Monitor_Form_Responses_v1(ICrateManager crateManager, IGoogleIntegration googleIntegration, IGoogleAppsScript googleAppsScript, IGoogleDrive googleDrive) : base(crateManager, googleIntegration) { _googleDrive = googleDrive; _googleAppsScript = googleAppsScript; }