This tree node lists all packages from a fixed repository.
Inheritance: NuGet.Dialog.Providers.PackagesTreeNodeBase
Example #1
0
 protected override void FillRootNodes()
 {
     var allNode = new SimpleTreeNode(
         this,
         Resources.Dialog_RootNodeAll,
         RootNode,
         LocalRepository,
         collapseVersion: false);
     RootNode.Nodes.Add(allNode);
 }
        protected override void FillRootNodes()
        {
            var allNode = new SimpleTreeNode(
                this,
                Resources.Dialog_RootNodeAll,
                RootNode,
                LocalRepository,
                collapseVersion: false);

            RootNode.Nodes.Add(allNode);
        }
Example #3
0
 protected internal virtual IVsPackageManager GetActivePackageManager()
 {
     if (SelectedNode == null)
     {
         return(null);
     }
     else if (SelectedNode.IsSearchResultsNode)
     {
         PackagesSearchNode searchNode = (PackagesSearchNode)SelectedNode;
         SimpleTreeNode     baseNode   = (SimpleTreeNode)searchNode.BaseNode;
         return(_packageManagerFactory.CreatePackageManager(baseNode.Repository, useFallbackForDependencies: true));
     }
     else
     {
         var selectedNode = SelectedNode as SimpleTreeNode;
         return((selectedNode != null) ? _packageManagerFactory.CreatePackageManager(selectedNode.Repository, useFallbackForDependencies: true) : null);
     }
 }
Example #4
0
        protected override void FillRootNodes()
        {
            var allNode = new SimpleTreeNode(this, Resources.Dialog_RootNodeAll, RootNode, _recentPackagesRepository);

            RootNode.Nodes.Add(allNode);
        }
Example #5
0
        protected override void FillRootNodes()
        {
            var allNode = new SimpleTreeNode(this, Resources.Dialog_RootNodeAll, RootNode, ProjectManager.LocalRepository);

            RootNode.Nodes.Add(allNode);
        }
Example #6
0
 protected override void FillRootNodes()
 {
     var allNode = new SimpleTreeNode(this, Resources.Dialog_RootNodeAll, RootNode, _recentPackagesRepository);
     RootNode.Nodes.Add(allNode);
 }
        public void GetPackagesDoNotReturnPrereleasePackagesIfToldSo()
        {
            // Arrange
            var sourceRepository = new MockPackageRepository();
            sourceRepository.AddPackage(PackageUtility.CreatePackage("Azo1", "2.0"));
            sourceRepository.AddPackage(PackageUtility.CreatePackage("Azo2", "3.0-alpha"));
            sourceRepository.AddPackage(PackageUtility.CreatePackage("B1", "2.0"));
            sourceRepository.AddPackage(PackageUtility.CreatePackage("B2", "4.0"));

            IVsExtensionsTreeNode parentTreeNode = new Mock<IVsExtensionsTreeNode>().Object;
            PackagesProviderBase provider = new MockPackagesProvider();
            var baseNode = new SimpleTreeNode(provider, "Online", parentTreeNode, sourceRepository);

            var searchNode = new PackagesSearchNode(provider, parentTreeNode, baseNode, "Azo");

            // Act
            var packages = searchNode.GetPackages(allowPrereleaseVersions: false).ToList();

            // Assert
            Assert.Equal(1, packages.Count);
            Assert.Equal("Azo1", packages[0].Id);
            Assert.Equal(new SemanticVersion("2.0"), packages[0].Version);
        }
Example #8
0
        protected override void FillRootNodes()
        {
            var allNode = new SimpleTreeNode(this, Resources.Dialog_RootNodeAll, RootNode, ProjectManager.LocalRepository);

            RootNode.Nodes.Add(allNode);
        }