Ejemplo n.º 1
0
        private void FetchRemoteInfo()
        {
            //using (var www = new WWW(Uri.EscapeUriString(LocalInfo.Url)))
            //{
            //    while (!www.isDone)
            //    {
            //        Thread.Sleep(100);
            //    }
            //    if (www.error == null)
            //    {
            try
            {
                SetRemoteInfo(HttpWebRequestBeginGetRequest.GetRequest(LocalInfo.Url));
            }
            catch (Exception ex)
            {
                Logger.Log("EXCEPTION: " + ex);
                SetLocalInfoOnly();
            }
            //}
            //else
            //{

            //}
            //}
        }
            public void FetchRemoteData()
            {
                string response = String.Empty;

                try
                {
                    response = HttpWebRequestBeginGetRequest.GetRequest("https://api.github.com/repos/" + Username + "/" + Repository + "/releases");
                }
                catch (Exception ex)
                {
                    Logger.Exception(ex);
                }
                finally
                {
                    if (!String.IsNullOrEmpty(response))
                    {
                        ParseGitHubJson(response);
                    }
                }
            }