public RestoreAndCheckForUpdatesAction(Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; solutionManager = PackageManagementServices.Workspace.GetSolutionManager(solution); nugetProjects = solutionManager.GetNuGetProjects().ToList(); if (AnyProjectsUsingPackagesConfig()) { restoreManager = new PackageRestoreManager( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solutionManager ); } if (AnyProjectsUsingProjectJson()) { buildIntegratedRestorer = new MonoDevelopBuildIntegratedRestorer( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solution.BaseDirectory); } }
public RestoreNuGetPackagesAction(Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; RestorePackagesConfigProjects = true; solutionManager = PackageManagementServices.Workspace.GetSolutionManager(solution); solutionManager.ClearProjectCache(); nugetProjects = solutionManager.GetNuGetProjects().ToList(); if (AnyProjectsUsingPackagesConfig()) { restoreManager = new PackageRestoreManager( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solutionManager ); } if (AnyDotNetCoreProjectsOrProjectsUsingProjectJson()) { buildIntegratedRestorer = new MonoDevelopBuildIntegratedRestorer(solutionManager); } if (AnyNuGetAwareProjects()) { nugetAwareRestorer = new NuGetAwareProjectPackageRestoreManager(solutionManager); } }
public MonoDevelopPackageRestoreManager (IMonoDevelopSolutionManager solutionManager) { restoreManager = new PackageRestoreManager ( solutionManager.CreateSourceRepositoryProvider (), solutionManager.Settings, solutionManager); }
public MonoDevelopPackageRestoreManager(IMonoDevelopSolutionManager solutionManager) { restoreManager = new PackageRestoreManager( solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings, solutionManager); }
protected virtual NuGetProject CreateNuGetProject( IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { return(new MonoDevelopNuGetProjectFactory(solutionManager.Settings, solutionManager.Configuration) .CreateNuGetProject(project)); }
public RestoreAndCheckForUpdatesAction (Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; solutionManager = PackageManagementServices.Workspace.GetSolutionManager (solution); nugetProjects = solutionManager.GetNuGetProjects ().ToList (); if (AnyProjectsUsingPackagesConfig ()) { restoreManager = new PackageRestoreManager ( solutionManager.CreateSourceRepositoryProvider (), solutionManager.Settings, solutionManager ); } if (AnyProjectsUsingProjectJson ()) { buildIntegratedRestorer = new MonoDevelopBuildIntegratedRestorer ( solutionManager.CreateSourceRepositoryProvider (), solutionManager.Settings); } if (AnyNuGetAwareProjects ()) { nugetAwareRestorer = new NuGetAwareProjectPackageRestoreManager (solutionManager); } }
public MonoDevelopBuildIntegratedRestorer(IMonoDevelopSolutionManager solutionManager) : this( solutionManager, solutionManager.CreateSourceRepositoryProvider(), solutionManager.Settings) { }
public RestoreAndCheckForUpdatesAction(Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; solutionManager = PackageManagementServices.Workspace.GetSolutionManager(solution); solutionManager.ClearProjectCache(); nugetProjects = solutionManager.GetNuGetProjects().ToList(); // Use the same source repository provider for all restores and updates to prevent // the credential dialog from being displayed for each restore and updates. sourceRepositoryProvider = solutionManager.CreateSourceRepositoryProvider(); if (AnyProjectsUsingPackagesConfig()) { restoreManager = new PackageRestoreManager( sourceRepositoryProvider, solutionManager.Settings, solutionManager ); } if (AnyDotNetCoreProjectsOrProjectsUsingProjectJson()) { buildIntegratedRestorer = new MonoDevelopBuildIntegratedRestorer( solutionManager, sourceRepositoryProvider, solutionManager.Settings); } if (AnyNuGetAwareProjects()) { nugetAwareRestorer = new NuGetAwareProjectPackageRestoreManager(solutionManager); } }
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(); } }
PackageManagementPathResolver CreatePathResolver(IMonoDevelopSolutionManager solutionManager) { if (solutionManager != null) { return(new PackageManagementPathResolver(solutionManager)); } return(new PackageManagementPathResolver()); }
protected virtual UninstallNuGetPackageAction CreateUninstallAction(IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { return(new UninstallNuGetPackageAction( solutionManager, project) { }); }
public RestoreNuGetPackagesAction(Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; RestorePackagesConfigProjects = true; solutionManager = PackageManagementServices.Workspace.GetSolutionManager(solution); solutionManager.ClearProjectCache(); }
internal RestoreNuGetPackagesAction(Solution solution, IMonoDevelopSolutionManager solutionManager) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; RestorePackagesConfigProjects = true; this.solutionManager = solutionManager; solutionManager.ClearProjectCache(); }
NuGetProject CreateNuGetProject(IMonoDevelopSolutionManager solutionManager, DotNetProject project) { if (solutionManager != null) { return(solutionManager.GetNuGetProject(new DotNetProjectProxy(project))); } return(new MonoDevelopNuGetProjectFactory().CreateNuGetProject(project)); }
public TestableManagePackagesViewModel( IMonoDevelopSolutionManager solutionManager, ISolution solution, FakeNuGetProjectContext projectContext, RecentManagedNuGetPackagesRepository recentPackagesRepository) : base(solutionManager, solution, projectContext, recentPackagesRepository, null) { FakeNuGetProjectContext = projectContext; RecentPackagesRepository = recentPackagesRepository; }
protected override UninstallNuGetPackageAction CreateUninstallAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { UninstallAction = new TestableUninstallNuGetPackageAction( (FakeSolutionManager)solutionManager, (FakeDotNetProject)project); return(UninstallAction); }
public TestableAllPackagesViewModel ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, FakeNuGetProjectContext projectContext, RecentNuGetPackagesRepository recentPackagesRepository) : base (solutionManager, dotNetProject, projectContext, recentPackagesRepository) { FakeNuGetProjectContext = projectContext; RecentPackagesRepository = recentPackagesRepository; }
public ReinstallNuGetPackageAction ( IDotNetProject project, IMonoDevelopSolutionManager solutionManager) : this ( project, solutionManager, new NuGetProjectContext (), PackageManagementServices.PackageManagementEvents) { }
public TestableManagePackagesViewModel( IMonoDevelopSolutionManager solutionManager, ISolution solution) : this( solutionManager, solution, new FakeNuGetProjectContext(), new RecentManagedNuGetPackagesRepository()) { }
public TestableManagePackagesViewModel( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, FakeNuGetProjectContext projectContext, RecentManagedNuGetPackagesRepository recentPackagesRepository) : base(solutionManager, dotNetProject.ParentSolution, projectContext, recentPackagesRepository, dotNetProject) { FakeNuGetProjectContext = projectContext; RecentPackagesRepository = recentPackagesRepository; }
public ReinstallNuGetPackageAction( IDotNetProject project, IMonoDevelopSolutionManager solutionManager) : this( project, solutionManager, new NuGetProjectContext(), PackageManagementServices.PackageManagementEvents) { }
public TestableAllPackagesViewModel ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) : this ( solutionManager, dotNetProject, new FakeNuGetProjectContext (), new RecentNuGetPackagesRepository ()) { }
protected override UninstallNuGetPackageAction CreateUninstallAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { UninstallAction = new TestableUninstallNuGetPackageAction ( (FakeSolutionManager)solutionManager, (FakeDotNetProject)project); return UninstallAction; }
public TestableAllPackagesViewModel( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) : this( solutionManager, dotNetProject, new FakeNuGetProjectContext(), new RecentNuGetPackagesRepository()) { }
public static FilePath GetPackagesFolderPath (this NuGetProject project, IMonoDevelopSolutionManager solutionManager) { if (project is BuildIntegratedProjectSystem) { string globalPackagesPath = SettingsUtility.GetGlobalPackagesFolder (solutionManager.Settings); return new FilePath (globalPackagesPath).FullPath; } string path = PackagesFolderPathUtility.GetPackagesFolderPath (solutionManager, solutionManager.Settings); return new FilePath (path).FullPath; }
public RestoreAndCheckForUpdatesAction(Solution solution) { this.solution = solution; packageManagementEvents = PackageManagementServices.PackageManagementEvents; solutionManager = new MonoDevelopSolutionManager(solution); // Use the same source repository provider for all restores and updates to prevent // the credential dialog from being displayed for each restore and updates. sourceRepositoryProvider = solutionManager.CreateSourceRepositoryProvider(); }
public RestoreNuGetPackagesInNuGetIntegratedProject( DotNetProject project, BuildIntegratedNuGetProject nugetProject, IMonoDevelopSolutionManager solutionManager) { this.project = project; this.nugetProject = nugetProject; packageManagementEvents = PackageManagementServices.PackageManagementEvents; packageRestorer = new MonoDevelopBuildIntegratedRestorer(solutionManager); }
public AllPackagesViewModel( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, RecentNuGetPackagesRepository recentPackagesRepository) : this( solutionManager, dotNetProject, new NuGetProjectContext(), recentPackagesRepository) { }
public UpdateNuGetPackageAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) : this ( solutionManager, dotNetProject, new NuGetProjectContext (), new MonoDevelopNuGetPackageManager (solutionManager), PackageManagementServices.PackageManagementEvents) { }
public UninstallNuGetPackagesAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) : this( solutionManager, dotNetProject, new NuGetProjectContext(), new MonoDevelopNuGetPackageManager(solutionManager), PackageManagementServices.PackageManagementEvents) { }
public UpdateNuGetPackageAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject) : this( solutionManager, dotNetProject, new NuGetProjectContext(solutionManager.Settings), new MonoDevelopNuGetPackageManager(solutionManager), PackageManagementServices.PackageManagementEvents) { }
public static bool IsMissing( IMonoDevelopSolutionManager solutionManager, PackageIdentity packageIdentity) { string globalPackagesFolder = SettingsUtility.GetGlobalPackagesFolder(solutionManager.Settings); var defaultPackagePathResolver = new VersionFolderPathResolver(globalPackagesFolder); string hashPath = defaultPackagePathResolver.GetHashPath(packageIdentity.Id, packageIdentity.Version); return(!File.Exists(hashPath)); }
public PackageManagementPathResolver(IMonoDevelopSolutionManager solutionManager) { var pathContext = NuGetPathContext.Create(solutionManager.Settings); pathResolver = new FallbackPackagePathResolver(pathContext); globalPackagesFolderResolver = new VersionFolderPathResolver(pathContext.UserPackageFolder); string packagesFolderPath = PackagesFolderPathUtility.GetPackagesFolderPath(solutionManager, solutionManager.Settings); folderNuGetProject = new FolderNuGetProject(packagesFolderPath); }
public async Task <bool> HasMissingPackages(IMonoDevelopSolutionManager solutionManager) { PackageIdentity packageIdentity = await GetNuGetBuildPackagingPackage(); if (packageIdentity == null) { return(false); } return(GlobalPackagesExtractor.IsMissing(solutionManager, packageIdentity)); }
protected virtual InstallNuGetPackageAction CreateInstallAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject project, IEnumerable <SourceRepository> repositories) { return(new InstallNuGetPackageAction( repositories, solutionManager, project, context )); }
public UpdateAllNuGetPackagesInProjectAction( IMonoDevelopSolutionManager solutionManager, DotNetProject dotNetProject) : this( solutionManager, new DotNetProjectProxy(dotNetProject), new NuGetProjectContext(), new MonoDevelopNuGetPackageManager(solutionManager), new MonoDevelopPackageRestoreManager(solutionManager), PackageManagementServices.PackageManagementEvents) { }
public UpdateAllNuGetPackagesInProjectAction ( IMonoDevelopSolutionManager solutionManager, DotNetProject dotNetProject) : this ( solutionManager, new DotNetProjectProxy (dotNetProject), new NuGetProjectContext (), new MonoDevelopNuGetPackageManager (solutionManager), new MonoDevelopPackageRestoreManager (solutionManager), PackageManagementServices.PackageManagementEvents) { }
protected override InstallNuGetPackageAction CreateInstallAction( IMonoDevelopSolutionManager solutionManager, IDotNetProject project, IEnumerable <SourceRepository> repositories) { InstallAction = new TestableInstallNuGetPackageAction( repositories, (FakeSolutionManager)solutionManager, (FakeDotNetProject)project); return(InstallAction); }
public RestoreNuGetPackagesInNuGetAwareProjectAction( DotNetProject project, IMonoDevelopSolutionManager solutionManager) { nugetAwareProject = (INuGetAwareProject)project; packageManagementEvents = PackageManagementServices.PackageManagementEvents; restoreManager = new NuGetAwareProjectPackageRestoreManager( solutionManager ); }
public RestoreNuGetPackagesInNuGetAwareProjectAction ( DotNetProject project, IMonoDevelopSolutionManager solutionManager) { nugetAwareProject = (INuGetAwareProject)project; packageManagementEvents = PackageManagementServices.PackageManagementEvents; restoreManager = new NuGetAwareProjectPackageRestoreManager ( solutionManager ); }
protected override InstallNuGetPackageAction CreateInstallAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject project, IEnumerable<SourceRepository> repositories) { InstallAction = new TestableInstallNuGetPackageAction ( repositories, (FakeSolutionManager)solutionManager, (FakeDotNetProject)project); return InstallAction; }
public MonoDevelopNuGetPackageManager (IMonoDevelopSolutionManager solutionManager) { var restartManager = new DeleteOnRestartManager (); settings = solutionManager.Settings; packageManager = new NuGetPackageManager ( solutionManager.CreateSourceRepositoryProvider (), settings, solutionManager, restartManager ); }
public RestoreNuGetPackagesInNuGetIntegratedProject ( DotNetProject project, BuildIntegratedNuGetProject nugetProject, IMonoDevelopSolutionManager solutionManager) { this.project = project; this.nugetProject = nugetProject; packageManagementEvents = PackageManagementServices.PackageManagementEvents; packageRestorer = new MonoDevelopBuildIntegratedRestorer ( solutionManager.CreateSourceRepositoryProvider (), solutionManager.Settings); }
public InstallNuGetPackageAction ( IEnumerable<SourceRepository> primarySources, IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext) : this ( primarySources, null, solutionManager, dotNetProject, projectContext) { }
ReinstallNuGetPackageAction CreateReinstallPackageAction ( PackageReferenceNode packageReference, IMonoDevelopSolutionManager solutionManager) { var action = new ReinstallNuGetPackageAction ( packageReference.Project, solutionManager); action.PackageId = packageReference.Id; action.Version = packageReference.Version; return action; }
public UpdatedNuGetPackagesProvider ( IDotNetProject dotNetProject, IMonoDevelopSolutionManager solutionManager, NuGetProject project, CancellationToken cancellationToken = default(CancellationToken)) { this.dotNetProject = dotNetProject; this.project = project; var sourceRepositoryProvider = solutionManager.CreateSourceRepositoryProvider (); this.sourceRepositories = sourceRepositoryProvider.GetRepositories ().ToList (); this.cancellationToken = cancellationToken; }
public ReinstallNuGetPackageAction ( IDotNetProject project, IMonoDevelopSolutionManager solutionManager, INuGetProjectContext projectContext, IPackageManagementEvents packageManagementEvents) { this.context = projectContext; this.packageManagementEvents = packageManagementEvents; var repositories = solutionManager.CreateSourceRepositoryProvider ().GetRepositories (); installAction = CreateInstallAction (solutionManager, project, repositories); uninstallAction = CreateUninstallAction (solutionManager, 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 static async Task Download ( IMonoDevelopSolutionManager solutionManager, PackageIdentity packageIdentity, INuGetProjectContext context, CancellationToken token) { if (!IsMissing (solutionManager, packageIdentity)) return; await PackageDownloader.GetDownloadResourceResultAsync ( solutionManager.CreateSourceRepositoryProvider ().GetRepositories (), packageIdentity, solutionManager.Settings, new LoggerAdapter (context), token); }
public InstallNuGetPackageAction ( IEnumerable<SourceRepository> primarySources, IEnumerable<SourceRepository> secondarySources, IMonoDevelopSolutionManager solutionManager, IDotNetProject dotNetProject, INuGetProjectContext projectContext) : this ( primarySources, secondarySources, solutionManager, dotNetProject, projectContext, new MonoDevelopNuGetPackageManager (solutionManager), PackageManagementServices.PackageManagementEvents) { }
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 RestoreNuGetPackagesInProjectAction ( DotNetProject project, NuGetProject nugetProject, IMonoDevelopSolutionManager solutionManager) { this.project = project; this.nugetProject = nugetProject; this.solutionManager = solutionManager; packageManagementEvents = PackageManagementServices.PackageManagementEvents; restoreManager = new PackageRestoreManager ( solutionManager.CreateSourceRepositoryProvider (), solutionManager.Settings, solutionManager ); }
protected virtual UninstallNuGetPackageAction CreateUninstallAction (IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { return new UninstallNuGetPackageAction ( solutionManager, project) { }; }
protected virtual InstallNuGetPackageAction CreateInstallAction ( IMonoDevelopSolutionManager solutionManager, IDotNetProject project, IEnumerable<SourceRepository> repositories) { return new InstallNuGetPackageAction ( repositories, solutionManager, project, context ); }
public async Task<bool> HasMissingPackages (IMonoDevelopSolutionManager solutionManager) { PackageIdentity packageIdentity = await GetNuGetBuildPackagingPackage (); if (packageIdentity == null) return false; return GlobalPackagesExtractor.IsMissing (solutionManager, packageIdentity); }
public async Task RestorePackagesAsync ( IMonoDevelopSolutionManager solutionManager, INuGetProjectContext context, CancellationToken token) { PackageIdentity packageIdentity = await GetNuGetBuildPackagingPackage (); if (packageIdentity == null) return; await GlobalPackagesExtractor.Download (solutionManager, packageIdentity, context, token); await Runtime.RunInMainThread (() => { PackagingNuGetProject.GenerateNuGetBuildPackagingTargets (packageIdentity, this); ReloadProjectBuilder (); }); }
public NuGetAwareProjectPackageRestoreManager ( IMonoDevelopSolutionManager solutionManager) { this.solutionManager = solutionManager; }
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; }
protected virtual NuGetProject CreateNuGetProject ( IMonoDevelopSolutionManager solutionManager, IDotNetProject project) { return new MonoDevelopNuGetProjectFactory (solutionManager.Settings) .CreateNuGetProject (project); }