Example #1
0
        protected override async Task ExecuteCore()
        {
            if (fileSystemOperations.DirectoryExists(destination))
            {
                return;
            }

            var stream = await downloader.GetStream(url, progressObserver);

            await extractor.ExtractToFolder(stream, destination);
        }
Example #2
0
        public async Task Execute()
        {
            if (Directory.Exists(folderPath))
            {
                Log.Warning("{Pack} was already downloaded. Skipping download.", repository);
                return;
            }

            var openZipStream = await downloader.OpenZipStream(downloadUrl);

            using (var stream = openZipStream)
            {
                await extractor.ExtractToFolder(stream, folderPath);
            }
        }
        public async Task Execute()
        {
            if (Directory.Exists(folderPath))
            {
                Log.Warning("{Pack} was already downloaded. Skipping download.", artifactName);
                return;
            }

            var artifact = await buildClient.LatestBuildArtifact(org, project, definitionId, artifactName);

            using (var httpClient = new HttpClient())
            {
                var stream = await httpClient.GetStreamAsync(artifact.Resource.DownloadUrl);

                await extractor.ExtractToFolder(stream, folderPath);
            }
        }