private Version GetVersionInfoFromServer(VersionModel latestVersionDto) { string processedVersion; if (latestVersionDto.TagName.Contains("-")) { processedVersion = latestVersionDto.TagName[1..latestVersionDto.TagName.IndexOf("-")] + ".0";
private static void DownloadLatestVersion(VersionModel latestVersionDto) { Process.Start(new ProcessStartInfo(latestVersionDto.Assets[0].BrowserDownloadUrl.AbsoluteUri) { UseShellExecute = true }); }
private static void DownloadLatestVersion(VersionModel latestVersionDto) { string downloadUrl = latestVersionDto.Assets[0].BrowserDownloadUrl.AbsoluteUri; if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { downloadUrl = downloadUrl.Replace("windows", "linux"); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { downloadUrl = downloadUrl.Replace("windows", "osx"); } Process.Start(new ProcessStartInfo(downloadUrl) { UseShellExecute = true }); }