void AddPackagesToProject(DotNetProject project, IList <NuGetPackageToAdd> packagesToAdd) { var message = ProgressMonitorStatusMessageFactory.CreateAddNuGetPackagesMessage(packagesToAdd); List <PaketAction> actions = packagesToAdd .Select(package => new AddNuGetToProjectPaketAction(package, project)) .OfType <PaketAction> () .ToList(); actions.Insert(0, new CreatePaketDependenciesFileIfNotExistPaketAction(project)); PaketServices.ActionRunner.Run(message, actions); }
void AddPackages(IList <NuGetPackageToAdd> packagesToAdd) { if (!packagesToAdd.Any()) { return; } var message = ProgressMonitorStatusMessageFactory.CreateAddNuGetPackagesMessage(packagesToAdd); List <AddNuGetToProjectPaketAction> actions = packagesToAdd .Select(package => new AddNuGetToProjectPaketAction(package, FolderNode.Project)) .ToList(); PaketServices.ActionRunner.Run(message, actions); }
void AddPackages(IList <NuGetPackageToAdd> packagesToAdd) { if (!packagesToAdd.Any()) { return; } var message = ProgressMonitorStatusMessageFactory.CreateAddNuGetPackagesMessage(packagesToAdd); FilePath dependenciesFile = FolderNode.GetPaketDependenciesFile(); List <AddNuGetPaketAction> actions = packagesToAdd .Select(package => new AddNuGetPaketAction(dependenciesFile, package)) .ToList(); PaketServices.ActionRunner.Run(message, actions); }