private static void ProcessLevels(PResponse response, Hashtable data, out List<PlayerLevel> levels, out int numlevels) { levels = new List<PlayerLevel> (); numlevels = 0; if (!response.success) return; numlevels = (int)(double)data["numlevels"]; var levelarr = (ArrayList)data["levels"]; levels.AddRange(from object t in levelarr select new PlayerLevel((Hashtable) t)); }
private static void ProcessScores(PResponse response, IDictionary data, out List<PlayerScore> scores, out int numitems) { scores = new List<PlayerScore>(); numitems = 0; if (!response.success) return; numitems = (int)(double)data["numscores"]; var scorearr = (ArrayList) data["scores"]; scores.AddRange(from object t in scorearr select new PlayerScore((Hashtable) t)); }