Пример #1
0
        // Resolve actions to install a package into the projects.
        // The returned actions are grouped by project.
        protected Dictionary <IProjectManager, IEnumerable <Resolver.PackageAction> > ResolveActionsByProjectForInstall(
            IPackage package,
            IVsPackageManager packageManager,
            IEnumerable <Project> selectedProjectsList)
        {
            var retValue = new Dictionary <IProjectManager, IEnumerable <Resolver.PackageAction> >();

            foreach (var project in selectedProjectsList)
            {
                var projectManager = packageManager.GetProjectManager(project);
                projectManager.Logger = this;

                var resolver = new Resolver.ActionResolver()
                {
                    Logger                  = this,
                    DependencyVersion       = packageManager.DependencyVersion,
                    AllowPrereleaseVersions = IncludePrerelease
                };
                resolver.AddOperation(
                    PackageAction.Install,
                    package,
                    projectManager);

                var actions = resolver.ResolveActions();
                if (actions.Any())
                {
                    retValue[projectManager] = actions;
                }
            }

            return(retValue);
        }
Пример #2
0
        protected IEnumerable <Resolver.PackageAction> ResolveActionsForInstall(
            IPackage package,
            IVsPackageManager packageManager,
            IEnumerable <Project> selectedProjectsList)
        {
            // Resolve operations
            var resolver = new Resolver.ActionResolver()
            {
                Logger                  = this,
                DependencyVersion       = packageManager.DependencyVersion,
                AllowPrereleaseVersions = IncludePrerelease
            };

            foreach (var project in selectedProjectsList)
            {
                var projectManager = packageManager.GetProjectManager(project);
                projectManager.Logger = this;

                resolver.AddOperation(
                    PackageAction.Install,
                    package,
                    projectManager);
            }

            var actions = resolver.ResolveActions();

            return(actions);
        }
Пример #3
0
        // Resolve actions to install a package into the projects.
        // The returned actions are grouped by project.
        protected Dictionary<IProjectManager, IEnumerable<Resolver.PackageAction>> ResolveActionsByProjectForInstall(
            IPackage package,
            IVsPackageManager packageManager,
            IEnumerable<Project> selectedProjectsList)
        {
            var retValue = new Dictionary<IProjectManager, IEnumerable<Resolver.PackageAction>>();
            foreach (var project in selectedProjectsList)
            {
                var projectManager = packageManager.GetProjectManager(project);
                projectManager.Logger = this;

                var resolver = new Resolver.ActionResolver()
                {
                    Logger = this,
                    DependencyVersion = packageManager.DependencyVersion,
                    AllowPrereleaseVersions = IncludePrerelease
                };
                resolver.AddOperation(
                    PackageAction.Install,
                    package,
                    projectManager);

                var actions = resolver.ResolveActions();
                if (actions.Any())
                {
                    retValue[projectManager] = actions;
                }
            }

            return retValue;
        }
Пример #4
0
        protected IEnumerable<Resolver.PackageAction> ResolveActionsForInstall(
            IPackage package,
            IVsPackageManager packageManager,
            IEnumerable<Project> selectedProjectsList)
        {
            // Resolve operations
            var resolver = new Resolver.ActionResolver()
            {
                Logger = this,
                DependencyVersion = packageManager.DependencyVersion,
                AllowPrereleaseVersions = IncludePrerelease
            };

            foreach (var project in selectedProjectsList)
            {
                var projectManager = packageManager.GetProjectManager(project);
                projectManager.Logger = this;

                resolver.AddOperation(
                    PackageAction.Install,
                    package,
                    projectManager);
            }

            var actions = resolver.ResolveActions();
            return actions;
        }