private async Task <PlayerModel[]> UpdatePlayers() { if (working) { return(null); } working = true; pbProgress.IsIndeterminate = true; CurrentMatch currentMatch = new CurrentMatch(); PlayerModel[] result = await Task.Run(() => currentMatch.UpdateCurrentMatch()); for (int i = 0; i < 10; i++) { PlayersViewmodel.PlayerModelsObservable[i] = result[i]; } pbProgress.IsIndeterminate = false; return(result); }