public async void CleanupDatabase() { if (DatabaseFileList.Count == 0) { DatabaseFileList = DatabaseHelper.LoadDatabase(); } await Task.Run(() => { DatabaseFileList = DatabaseHelper.CleanupDatabase(DatabaseFileList); DatabaseHelper.SaveDatabase(DatabaseFileList); }); DatabaseCleaned?.Invoke(this, new EventArgs()); }
public async void CleanupDatabase() { await Task.Run(() => DatabaseHelper.CleanupDatabase(DatabaseFileList)); DatabaseCleaned?.Invoke(this, null); }