public static IEnumerable <int> GetGames(string comunityId) { if (_instance == null || _instance._communityId != comunityId) { _instance = new AllOwnedGames(comunityId); } return(_instance._games); }
public static IEnumerable<int> GetGames(string comunityId) { if (_instance == null || _instance._communityId!=comunityId) { _instance = new AllOwnedGames(comunityId); } return _instance._games; }
public async Task Refresh() { GameDatas.SuspendCollectionChanged = true; var games = Task.Run <IEnumerable <GameData> >(() => { return(AllOwnedGames.GetGames(UserData.SteamCommunityId) .Select(o => new GameData(o)) .OrderBy(o => o.Installed ? 0 : 1) .ThenBy(o => o.Name) .ToList()); }); GameDatas.Clear(); foreach (var game in (await games)) { GameDatas.Add(game); game.SaveToCache(); } GameDatas.SuspendCollectionChanged = false; GameDatas.RefreshBinding(); }