private async void SyncBackups() { var dbManager = new DatabaseManager(new DroidSqliteConnectionFactory(), new MvxAndroidFileStore()); var settings = new SettingsManager(new Settings()); var backupManager = new BackupManager(new OneDriveService(new MvxAndroidFileStore(), new OneDriveAuthenticator()), new MvxAndroidFileStore(), dbManager, settings, new PaymentRepository(dbManager), new Connectivity()); await backupManager.DownloadBackup(); }
public async void Run(IBackgroundTaskInstance taskInstance) { var deferral = taskInstance.GetDeferral(); try { var dbManager = new DatabaseManager(new WindowsSqliteConnectionFactory(), new MvxWindowsCommonFileStore()); var settingsManager = new SettingsManager(new WindowsCommonSettings()); var backupManager = new BackupManager(new OneDriveService(new MvxWindowsCommonFileStore(), new OneDriveAuthenticator()), new MvxWindowsCommonFileStore(), dbManager, settingsManager, new PaymentRepository(dbManager), new Connectivity()); await backupManager.DownloadBackup(); } finally { deferral.Complete(); } }