IProjectManager GetActiveProjectManager()
        {
            IPackageRepository          repository     = ActivePackageRepository;
            ISharpDevelopPackageManager packageManager = CreatePackageManager(repository);

            return(packageManager.ProjectManager);
        }
        public void UninstallPackage(IPackageRepository repository, IPackage package)
        {
            ISharpDevelopPackageManager packageManager = CreatePackageManager(repository);

            packageManager.UninstallPackage(package);
            projectService.RefreshProjectBrowser();
            OnPackageUninstalled();
        }
        ISharpDevelopPackageManager CreatePackageManager(IPackageRepository packageRepository)
        {
            MSBuildBasedProject         project        = projectService.CurrentProject as MSBuildBasedProject;
            ISharpDevelopPackageManager packageManager = packageManagerFactory.CreatePackageManager(packageRepository, project);

            ConfigureLogger(packageManager);
            return(packageManager);
        }
        void ConfigureLogger(ISharpDevelopPackageManager packageManager)
        {
            packageManager.Logger            = outputMessagesView;
            packageManager.FileSystem.Logger = outputMessagesView;

            IProjectManager projectManager = packageManager.ProjectManager;

            projectManager.Logger         = outputMessagesView;
            projectManager.Project.Logger = outputMessagesView;
        }
        public void UpdatePackage(
            IPackageRepository repository,
            IPackage package,
            IEnumerable <PackageOperation> operations)
        {
            ISharpDevelopPackageManager packageManager = CreatePackageManager(repository);

            packageManager.UpdatePackage(package, operations);
            projectService.RefreshProjectBrowser();
            RecentPackageRepository.AddPackage(package);
            OnPackageInstalled();
        }
Ejemplo n.º 6
0
		public PackageManagementProject (
			IPackageRepository sourceRepository,
			IDotNetProject project,
			IPackageManagementEvents packageManagementEvents,
			IPackageManagerFactory packageManagerFactory)
		{
			SourceRepository = sourceRepository;
			this.project = project;
			this.packageManagementEvents = packageManagementEvents;
			
			packageManager = packageManagerFactory.CreatePackageManager (sourceRepository, project);
			projectManager = packageManager.ProjectManager;
		}
Ejemplo n.º 7
0
        public PackageManagementProject(
            IPackageRepository sourceRepository,
            IDotNetProject project,
            IPackageManagementEvents packageManagementEvents,
            IPackageManagerFactory packageManagerFactory)
        {
            SourceRepository             = sourceRepository;
            this.project                 = project;
            this.packageManagementEvents = packageManagementEvents;

            packageManager = packageManagerFactory.CreatePackageManager(sourceRepository, project);
            projectManager = packageManager.ProjectManager;
        }
        public PackageManagementProject(
			IPackageRepository sourceRepository,
			MSBuildBasedProject project,
			IPackageManagementEvents packageManagementEvents,
			IPackageManagerFactory packageManagerFactory)
        {
            SourceRepository = sourceRepository;
            msbuildProject = project;
            targetFramework = new ProjectTargetFramework(project);
            this.packageManagementEvents = packageManagementEvents;

            packageManager = packageManagerFactory.CreatePackageManager(sourceRepository, project);
            projectManager = packageManager.ProjectManager;
        }
Ejemplo n.º 9
0
        public PackageManagementProject(
            IPackageRepository sourceRepository,
            MSBuildBasedProject project,
            IPackageManagementEvents packageManagementEvents,
            IPackageManagerFactory packageManagerFactory)
        {
            SourceRepository             = sourceRepository;
            msbuildProject               = project;
            targetFramework              = new ProjectTargetFramework(project);
            this.packageManagementEvents = packageManagementEvents;

            packageManager = packageManagerFactory.CreatePackageManager(sourceRepository, project);
            projectManager = packageManager.ProjectManager;
        }
		void ConfigureLogger(ISharpDevelopPackageManager packageManager)
		{
			packageManager.Logger = outputMessagesView;
			packageManager.FileSystem.Logger = outputMessagesView;
			
			IProjectManager projectManager = packageManager.ProjectManager;
			projectManager.Logger = outputMessagesView;
			projectManager.Project.Logger = outputMessagesView;
		}