public UpdatePresentResult2 IsUpdateAvailable2( UpdateCheckInfo2 info ) { try { CheckThrowApiKey(info.ApiKey); var v1 = new Version(info.VersionNumber); var v2 = availableVersion; var url = v1 >= v2 ? string.Empty : ConfigurationManager.AppSettings[@"updateChecker.downloadUrl"]; var web = v1 >= v2 ? string.Empty : ConfigurationManager.AppSettings[@"updateChecker.websiteUrl"]; var result = new UpdatePresentResult2 { IsPresent = v1 < v2, DownloadWebsiteUrl = web }; LogCentral.Current.LogInfo(string.Format(@"Returning download URL '{0}'.", url)); return result; } catch (Exception x) { LogCentral.Current.LogError(@"Error checking whether an update is available.", x); throw; } }
public UpdatePresentResult2 IsUpdateAvailable2( UpdateCheckInfo2 info) { try { CheckThrowApiKey(info.ApiKey); var v1 = new Version(info.VersionNumber); var v2 = availableVersion; var url = v1 >= v2 ? string.Empty : ConfigurationManager.AppSettings[@"updateChecker.downloadUrl"]; var web = v1 >= v2 ? string.Empty : ConfigurationManager.AppSettings[@"updateChecker.websiteUrl"]; var result = new UpdatePresentResult2 { IsPresent = v1 < v2, DownloadWebsiteUrl = web }; LogCentral.Current.LogInfo(string.Format(@"Returning download URL '{0}'.", url)); return(result); } catch (Exception x) { LogCentral.Current.LogError(@"Error checking whether an update is available.", x); throw; } }