public bool DownloadPackage(PublicObjectView packageView, string destination, RequestWrapper request)
 {
     try
     {
         request.Debug(Messages.DebugInfoCallMethod3, "NuGetLocalPackageFeed", "DownloadPackage", destination);
         PackageItem package = packageView.GetValue <PackageItem>();
         // TODO: For now this has to require NuGetRequest, due to its usage of stuff like request.GetOptionValue and request.YieldPackage
         return(NuGetClient.InstallOrDownloadPackageHelper(package, request.Request, Constants.Install,
                                                           (packageItem, progressTracker) => NuGetClient.DownloadSinglePackage(packageItem, request.Request, destination, progressTracker)));
     }
     finally
     {
         request.Debug(Messages.DebugInfoReturnCall, "NuGetLocalPackageFeed", "DownloadPackage");
     }
 }
예제 #2
0
 public bool InstallPackage(PublicObjectView packageView, RequestWrapper request)
 {
     try
     {
         request.Debug(Messages.DebugInfoCallMethod, "NuGetFilesFeed3", "InstallPackage");
         PackageItem package = packageView.GetValue <PackageItem>();
         request.Debug(Messages.DebugInfoCallMethod3, "NuGetFilesFeed3", "InstallPackage", package.FastPath);
         return(NuGetClient.InstallOrDownloadPackageHelper(package, request.Request, Constants.Install,
                                                           (packageItem, progressTracker) => this.InstallSinglePackage(packageItem, request.Request, progressTracker)));
     }
     finally
     {
         request.Debug(Messages.DebugInfoReturnCall, "NuGetFilesFeed3", "InstallPackage");
     }
 }