Esempio n. 1
0
        internal async Task <List <GithubReleaseInfo> > GetReleaseInfoAsync(string url)
        {
            var tries = 0;

            while (tries < 3)
            {
                try
                {
                    var releaseJson = await client.GetStringAsync(url);

                    return(GithubReleaseInfo.FromJson(releaseJson));
                }
                catch (Exception)
                {
                    Thread.Sleep(1000);
                }

                tries++;
            }

            throw new HttpRequestException("Failed to retrieve release info");
        }
Esempio n. 2
0
 public bool IsUpdate(string currentVersion, GithubReleaseInfo latestReleaseInfo)
 {
     return(IsUpdate(currentVersion, latestReleaseInfo?.TagName));
 }