コード例 #1
0
        private async void OnRebuildDatabase(object sender, RoutedEventArgs e)
        {
            var path = Windows.Storage.ApplicationData.Current.LocalFolder.Path;

            System.Diagnostics.Debug.WriteLine($"INFO: local files are in {path}");
            var bookdb = BookDataContext.Get();
            int nbook  = await RdfReader.ReadDirAsync(bookdb);

            if (nbook < 5)
            {
                App.Error($"Error when rebuilding database; only got {nbook} for {path}");
            }
            // Will clear out the old db and save as needed.
        }