Ejemplo n.º 1
0
        public static Platform Parse(SpeedrunComClient client, dynamic platformElement)
        {
            if (platformElement is ArrayList)
                return null;

            var platform = new Platform();

            //Parse Attributes

            platform.ID = platformElement.id as string;
            platform.Name = platformElement.name as string;
            platform.YearOfRelease = (int)platformElement.released;

            //Parse Links

            platform.Games = client.Games.GetGames(platformId: platform.ID);
            platform.Runs = client.Runs.GetRuns(platformId: platform.ID);

            return platform;
        }