示例#1
0
        private async Task MigrateAsync()
        {
            var migrator = await LegacyDbMigrator.CreateAsync();

            if (migrator.IsMigrationNeeded)
            {
                var dialog = new BusyIndicator();
                dialog.TaskDescription = _resourceLoader.GetString("Application_MigrationMessage");
                dialog.Show();
                try
                {
                    await migrator.MigrateAsync();

                    await _bookProvider.RefreshAsync();
                }
                finally
                {
                    dialog.Hide();
                }
            }
        }