Пример #1
0
        private string GetDownloadURL(GitHubRelease release)
        {
            if (release.assets != null && release.assets.Count > 0)
            {
                GitHubAsset asset = release.assets[0];

                if (asset != null && !string.IsNullOrEmpty(asset.name))
                {
                    return(string.Format("https://github.com/{0}/{1}/releases/download/{2}/{3}", Owner, Repo, release.tag_name, asset.name));
                }
            }

            return(null);
        }
Пример #2
0
        private string GetDownloadURL(GitHubRelease release)
        {
            if (release.assets != null && release.assets.Count > 0)
            {
                GitHubAsset asset = release.assets[0];

                if (asset != null && !string.IsNullOrEmpty(asset.name))
                {
                    return string.Format("https://github.com/{0}/{1}/releases/download/{2}/{3}", Owner, Repo, release.tag_name, asset.name);
                }
            }

            return null;
        }