예제 #1
0
        public static SetViewModel GetSet(int setID)
        {
            string json;
            var    httpWebRequest = (HttpWebRequest)WebRequest.Create("http://url");

            httpWebRequest.Method = "GET";

            var httpReponse = (HttpWebResponse)httpWebRequest.GetResponse();

            using (var streamReader = new StreamReader(httpReponse.GetResponseStream()))
            {
                json = streamReader.ReadToEnd();
            }

            return(JSONConverter.DeserializeJSONSet(json));
        }
예제 #2
0
 public void OpenSet(string json)
 {
     activeSet = JSONConverter.DeserializeJSONSet(json);
     Insert(activeSet);
 }