public override async Task <string> GetDownloadUrl(string fullPackageName, CancellationToken cancellationToken = default) { var versionNumber = fullPackageName.Substring("disunity_".Length); var allVersions = await _disunityClient.GetDisunityVersionsAsync(cancellationToken); var foundVersion = allVersions.SingleOrDefault(v => v.VersionNumber == versionNumber); return(foundVersion?.Url); }
private async Task <string> GetMatchingDisunityVersion(TargetVersionDto targetInfo) { var request = ResolveCompatibleVersion(targetInfo); if (request != null) { return(request.ToString(3)); } var disunityVersions = await _disunityClient.GetDisunityVersionsAsync(); var latestVersion = disunityVersions.First(); return(latestVersion.VersionNumber); }