public AllPackagesViewModel( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, RecentNuGetPackagesRepository recentPackagesRepository) { this.solutionManager = solutionManager; this.dotNetProject = dotNetProject; this.recentPackagesRepository = recentPackagesRepository; PackageViewModels = new ObservableCollection <PackageSearchResultViewModel> (); CheckedPackageViewModels = new ObservableCollection <PackageSearchResultViewModel> (); ErrorMessage = String.Empty; packageManager = new NuGetPackageManager( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solutionManager, new DeleteOnRestartManager() ); if (dotNetProject.DotNetProject != null) { nugetProject = solutionManager.GetNuGetProject(dotNetProject); GetPackagesInstalledInProject(); } }
NuGetProject CreateNuGetProject(IMonoDevelopSolutionManager solutionManager, DotNetProject project) { if (solutionManager != null) { return(solutionManager.GetNuGetProject(new DotNetProjectProxy(project))); } return(new MonoDevelopNuGetProjectFactory().CreateNuGetProject(project)); }
public static NuGetProject CreateNuGetProject(this DotNetProject project, IMonoDevelopSolutionManager solutionManager) { if (solutionManager != null) { var nugetProject = solutionManager.GetNuGetProject(new DotNetProjectProxy(project)) .WithConsoleHostProjectServices(project); } return(new MonoDevelopNuGetProjectFactory() .CreateNuGetProject(project) .WithConsoleHostProjectServices(project)); }
public UninstallNuGetPackageAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject (dotNetProject); }
public UninstallNuGetPackagesAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject(dotNetProject); }
public RestoreAndUninstallNuGetPackageAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) { this.dotNetProject = dotNetProject; nugetProject = solutionManager.GetNuGetProject(dotNetProject) as MSBuildNuGetProject; packagePathResolver = new PackagePathResolver(nugetProject.GetPackagesFolderPath(solutionManager)); restoreAction = new RestoreNuGetPackagesInProjectAction( dotNetProject.DotNetProject, nugetProject, solutionManager); uninstallAction = new UninstallNuGetPackageAction(solutionManager, dotNetProject); }
public RestoreAndUninstallNuGetPackageAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) { this.dotNetProject = dotNetProject; nugetProject = solutionManager.GetNuGetProject (dotNetProject) as MSBuildNuGetProject; packagePathResolver = new PackagePathResolver (nugetProject.GetPackagesFolderPath (solutionManager)); restoreAction = new RestoreNuGetPackagesInProjectAction ( dotNetProject.DotNetProject, nugetProject, solutionManager); uninstallAction = new UninstallNuGetPackageAction (solutionManager, dotNetProject); }
public UpdateNuGetPackageAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject (dotNetProject); sourceRepositoryProvider = solutionManager.CreateSourceRepositoryProvider (); primarySources = sourceRepositoryProvider.GetRepositories ().ToList (); }
public UpdateNuGetPackageAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject(dotNetProject); sourceRepositoryProvider = solutionManager.CreateSourceRepositoryProvider(); primarySources = sourceRepositoryProvider.GetRepositories().ToList(); }
/// <summary> /// Execute will restore packages for all projects that transitively reference the project /// passed to the constructor of this restore action if this method is passed. /// </summary> void IncludeTransitiveProjectReferences() { var projects = project.DotNetProject.GetReferencingProjects(); if (!projects.Any()) { return; } referencingProjects = new List <BuildIntegratedNuGetProject> (); foreach (var referencingProject in projects) { var projectProxy = new DotNetProjectProxy(referencingProject); var currentNuGetProject = solutionManager.GetNuGetProject(projectProxy) as BuildIntegratedNuGetProject; if (currentNuGetProject != null) { referencingProjects.Add(currentNuGetProject); } } }
public ManagePackagesViewModel( IMonoDevelopSolutionManager solutionManager, ISolution solution, INuGetProjectContext projectContext, RecentManagedNuGetPackagesRepository recentPackagesRepository, IDotNetProject project) { this.solutionManager = solutionManager; this.projectContext = projectContext; this.recentPackagesRepository = recentPackagesRepository; IsManagingSolution = project == null; PackageViewModels = new ObservableCollection <ManagePackagesSearchResultViewModel> (); CheckedPackageViewModels = new ObservableCollection <ManagePackagesSearchResultViewModel> (); ProjectViewModels = new ObservableCollection <ManageProjectViewModel> (); ErrorMessage = String.Empty; PageSelected = ManagePackagesPage.Browse; if (project != null) { dotNetProjects = new List <IDotNetProject> (); dotNetProjects.Add(project); } else { dotNetProjects = solution.GetAllProjects().ToList(); } packageManager = new NuGetPackageManager( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solutionManager, new DeleteOnRestartManager() ); nugetProjects = dotNetProjects .Select(dotNetProject => solutionManager.GetNuGetProject(dotNetProject)) .ToList(); GetPackagesInstalledInProjects().Ignore(); }
public InstallNuGetPackageAction( IEnumerable <SourceRepository> primarySources, IEnumerable <SourceRepository> secondarySources, IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.primarySources = primarySources.ToList(); this.secondarySources = secondarySources?.ToList(); this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject(dotNetProject); LicensesMustBeAccepted = true; PreserveLocalCopyReferences = true; OpenReadmeFile = true; }
public NuGetProject GetNuGetProject(string projectName) { string activeProjectName = GetActiveProjectName(projectName); return(solutionManager.GetNuGetProject(activeProjectName)); }
public NuGetProject GetNuGetProject(IDotNetProject project) { return(solutionManager.GetNuGetProject(project)); }
public InstallNuGetPackageAction ( IEnumerable<SourceRepository> primarySources, IEnumerable<SourceRepository> secondarySources, IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext, INuGetPackageManager packageManager, IPackageManagementEvents packageManagementEvents) { this.primarySources = primarySources.ToList (); this.secondarySources = secondarySources?.ToList (); this.dotNetProject = dotNetProject; this.context = projectContext; this.packageManager = packageManager; this.packageManagementEvents = packageManagementEvents; project = solutionManager.GetNuGetProject (dotNetProject); LicensesMustBeAccepted = true; PreserveLocalCopyReferences = true; OpenReadmeFile = true; }
public NuGetProject GetNuGetProject(string nuGetProjectSafeName) { return(solutionManager.GetNuGetProject(nuGetProjectSafeName)); }
public void AddProject(IDotNetProject project) { dotNetProjects.Add(project); projects.Add(solutionManager.GetNuGetProject(project)); }