internal ActiveGamers(JsonArray dict) { JsonArray activeGamersArray = (JsonArray) dict; Gamers = new List<ActiveGamer>(); foreach (JsonObject gamerPair in activeGamersArray) { object nickname; gamerPair.TryGetValue("nickname", out nickname); object gamerId; gamerPair.TryGetValue("gamer_id", out gamerId); ActiveGamer activeGamer = new ActiveGamer(gamerId.ToString(), nickname.ToString()); Gamers.Add(activeGamer); } }
internal ActiveGamers(JsonArray dict) { JsonArray activeGamersArray = (JsonArray)dict; Gamers = new List <ActiveGamer>(); foreach (JsonObject gamerPair in activeGamersArray) { object nickname; gamerPair.TryGetValue("nickname", out nickname); object gamerId; gamerPair.TryGetValue("gamer_id", out gamerId); ActiveGamer activeGamer = new ActiveGamer(gamerId.ToString(), nickname.ToString()); Gamers.Add(activeGamer); } }