public bool checkForUpdate(string currentVersion) { string response = GetRequest(); if (response == null) { return(false); } GithubApiResponds apiResponds = JsonConvert.DeserializeObject <GithubApiResponds>(response); latestVersion = apiResponds.tag_name; downloadUri = apiResponds.assets[0].browser_download_url; return(Version.IsVersionOlder(currentVersion, apiResponds.tag_name)); }
public bool checkForUpdate(string currentVersion) { string response = GetRequest(); if (response == null) { return(false); } GithubApiResponds apiResponds = JsonConvert.DeserializeObject <GithubApiResponds>(response); latestVersion = apiResponds.tag_name; downloadUri = apiResponds.assets[0].browser_download_url; if (currentVersion.ToLower() != apiResponds.tag_name.ToLower() && !(currentVersion.ToLower().Contains("test") || currentVersion.ToLower().Contains("beta"))) { return(true); } return(false); }