public RbxInstallProtocol(GitHubReleaseAsset asset)
 {
     FileName       = asset.name.Replace(".zip", "");
     LocalDirectory = "";
     FetchDirectly  = true;
     DirectUrl      = asset.browser_download_url;
 }
        private static async Task <string> getCurrentVersionImpl(string database, List <RbxInstallProtocol> instructions = null)
        {
            if (database == "future-is-bright")
            {
                // This is an ugly hack, but it doesn't require as much special casing for the installation protocol.
                string latestRelease = await http.DownloadStringTaskAsync("https://api.github.com/repos/roblox/future-is-bright/releases/latest");

                GitHubRelease        release = GitHubRelease.Get(latestRelease);
                GitHubReleaseAsset[] assets  = release.assets;

                string result = "";
                for (int i = 0; i < assets.Length; i++)
                {
                    GitHubReleaseAsset asset = release.assets[i];
                    string             name  = asset.name;
                    if (name.StartsWith("future-is-bright") && name.EndsWith(".zip") && !name.Contains("-mac"))
                    {
                        result = name;
                        if (instructions != null)
                        {
                            instructions.Add(new RbxInstallProtocol(asset));
                        }

                        break;
                    }
                }

                return(result);
            }
            else
            {
                if (versionCompKey == null)
                {
                    versionCompKey = await http.DownloadStringTaskAsync(gitContentUrl + "VersionCompatibilityApiKey");
                }

                string versionUrl = "http://versioncompatibility.api." + database +
                                    ".com/GetCurrentClientVersionUpload/?apiKey=" + versionCompKey +
                                    "&binaryType=WindowsStudio";


                string buildName = await http.DownloadStringTaskAsync(versionUrl);

                buildName = buildName.Replace('"', ' ').Trim();
                return(buildName);
            }
        }