Пример #1
0
        public async Task <IPackage> DownloadAsync(long id, string revision = "master")
        {
            Ensure.IsValidId(id);

            var packageStream = await api.DownloadAsync($"/repositories/{id}@{revision}/package.zip");

            return(ZipPackage.FromStream(packageStream, stripFirstLevel: false));
        }
Пример #2
0
        public async Task <IPackage> DownloadAsync(long id, SemanticVersion version)
        {
            Ensure.IsValidId(id);

            var stream = await api.DownloadAsync($"/programs/{id}@{version}/package.zip");

            // All zip packages will be rooted...

            return(ZipPackage.FromStream(stream, stripFirstLevel: false));
        }