Esempio n. 1
0
        //-------------------------------------------------------------

        public NbaGameInfo GetGameInfo(Guid gameId)
        {
            Uri nbaGameInfoUri = GetGameInfoUri(gameId);
            //NbaGameInfo nbaGameInfo = GetGameInfoJson<NbaGameInfo>(nbaGameInfoUri);

            // todo this is faked in order to get code to compile for now *******************
            NbaGameInfo nbaGameInfo = new NbaGameInfo();

            return(nbaGameInfo);
        }
Esempio n. 2
0
        public NbaGameInfo GetGameInfo(Guid gameId)
        {
            Uri nbaGameInfoUri = GetGameInfoUri(gameId);

            if (GameInfoXmlSerializer == null)
            {
                GameInfoXmlSerializer = new XmlSerializer(typeof(NbaGameInfo));
            }

            NbaGameInfo nbaGameInfo = GetGameInfo <NbaGameInfo>(nbaGameInfoUri);

            return(nbaGameInfo);
        }
Esempio n. 3
0
        public NbaGameInfo GetGameSummary(Guid gameId)
        {
            // the SportRadar game boxscore and game summary use the same schema and base URL
            Uri          gameSummaryUri    = GetGameSummaryUri(gameId);
            string       gameSummaryString = ReadResponseFromUri(gameSummaryUri);
            StringReader stringReader      = new StringReader(gameSummaryString);

            if (GameInfoXmlSerializer == null)
            {
                GameInfoXmlSerializer = new XmlSerializer(typeof(NbaGameInfo));
            }

            NbaGameInfo nbaGameSummary = (NbaGameInfo)GameInfoXmlSerializer.Deserialize(stringReader);

            return(nbaGameSummary);
        }