コード例 #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
ファイル: PackagesProviderBase.cs プロジェクト: rikoe/nuget
        // 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
ファイル: PackagesProviderBase.cs プロジェクト: rikoe/nuget
        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;
        }