private async void UpdateServers() { IsLoading = true; try { await RepzDataAccess.UpdateCollection(Servers, RepzDataAccess.GetServersAsync, x => x.Server, x => Add(x), false); if (AutoRefresh) { RefreshTimer.Start(); } } catch (ExceptionBase ex) { SetError(ex, UpdateServers); } catch (Exception) { SetError(new Exception("Unknown error"), UpdateServers); } finally { IsLoading = false; } }
private async void CmdSearch() { IsLoading = true; try { await RepzDataAccess.UpdateCollection <PlayerViewModel, Player>(Players, GetData, x => x.Player, AddPlayer, true); } catch (ExceptionBase ex) { SetError(ex, CmdSearch); } IsLoading = false; }