private static void Backup(string nugetServerUrl, DataServicePackage package, string packageBackupfolder, bool whatIf)
 {
     var serverUrl = string.Format("{0}/api/v2/package/{1}/{2}", nugetServerUrl, package.Id, package.Version);
       var uri = new Uri(serverUrl);
       logger.Info(string.Format("Downloading package {0} to folder {1} from url {2}",package.Id,packageBackupfolder,uri));
       if (!whatIf)
       {
     var downloader = new PlexPackageDownloader(uri, packageBackupfolder);
     downloader.Download(package);
       }
       else
       {
     logger.Info("skipping as whatif is true");
       }
 }
예제 #2
0
        private static void Backup(string nugetServerUrl, DataServicePackage package, string packageBackupfolder, bool whatIf)
        {
            var serverUrl = string.Format("{0}/api/v2/package/{1}/{2}", nugetServerUrl, package.Id, package.Version);
            var uri       = new Uri(serverUrl);

            logger.Info(string.Format("Downloading package {0} to folder {1} from url {2}", package.Id, packageBackupfolder, uri));
            if (!whatIf)
            {
                var downloader = new PlexPackageDownloader(uri, packageBackupfolder);
                downloader.Download(package);
            }
            else
            {
                logger.Info("skipping as whatif is true");
            }
        }