예제 #1
0
        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);
        }
예제 #2
0
        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);
        }