Exemple #1
0
        public DeserializeMatches deserialize()
        {
            var url = string.Format("http://localhost:53766/api/Match/");

            // Syncronious Consumption
            var syncClient = new WebClient();

            var content = syncClient.DownloadString(url);

            DeserializeMatches matches = JsonConvert.DeserializeObject <DeserializeMatches>(content);

            return(matches);
        }
Exemple #2
0
        public Match deserialize(string id)
        {
            var url = string.Format("http://localhost:53766/api/Match/");

            // Syncronious Consumption
            var syncClient = new WebClient();

            var content = syncClient.DownloadString(url);

            DeserializeMatches matches = JsonConvert.DeserializeObject <DeserializeMatches>(content);

            var match = matches.Matches.Where(x => x.Id == id).FirstOrDefault();

            return(match);
        }