Bari.Core.Tools.DownloadablePackedExternalTool.DownloadAndDeploy C# (CSharp) Method

DownloadAndDeploy() protected method

Downloads the tool to the given target path
protected DownloadAndDeploy ( string target ) : void
target string Target directory
return void
        protected override void DownloadAndDeploy(string target)
        {
            var tempZip = Path.GetTempFileName();

            using (var client = new WebClient())
            {
                client.DownloadFile(Url, tempZip);

                log.DebugFormat("Extracting downloaded archive to {0}", target);
                using (var zip = new ZipFile(tempZip))
                {
                    zip.ExtractAll(target);
                }

                log.DebugFormat("Extracting completed");
            }
        }