Bari.Core.Tools.DownloadableSelfExtractingExternalTool.DownloadAndDeploy C# (CSharp) Метод

DownloadAndDeploy() защищенный Метод

Downloads the tool to the given target path
protected DownloadAndDeploy ( string target ) : void
target string Target directory
Результат void
        protected override void DownloadAndDeploy(string target)
        {
            var tempInstaller = Path.GetTempFileName() + ".exe";

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

                log.DebugFormat("Installing downloaded package to {0}", target);

                var process = System.Diagnostics.Process.Start(tempInstaller, GetInstallerArguments(target));
                if (process == null)
                    throw new InvalidOperationException("Could not start tool installer");

                process.WaitForExit();

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