/// <summary> /// Get the url of a HC build by the OS, architecture and version properties /// <summary> public string GetBuildUrl(string os, string arch, string version = "latest") { HcReleasesBuild hcBuild = GetBuild(os, arch, version); if (hcBuild != null) { return(hcBuild.Url); } else { return(null); } }
/// <summary> /// Get an HcReleasesBuild object by the OS, architecture and version properties.async /// If build is not found returns null /// <summary> public HcReleasesBuild GetBuild(string os, string arch, string version = "latest") { string requestedVersion = version; if (version == "latest") { requestedVersion = GetLatestVersion(); } HcReleasesBuild hcBuild = null; HcReleasesVersion hcVersion = Versions[requestedVersion]; if (hcVersion != null) { hcBuild = hcVersion.Builds.Where( build => build.Os == os && build.Arch == arch ).SingleOrDefault(); } return(hcBuild); }