Exemplo n.º 1
0
        void AddChild(ITreeBuilder treeBuilder, object dataObject)
        {
            ChildNodes.Add(dataObject);

            if (dataObject is AssemblyDependenciesNode assemblyDependencies)
            {
                AssemblyDependencies = assemblyDependencies;
            }
            else if (dataObject is PackageDependenciesNode packageDependencies)
            {
                PackageDependencies = packageDependencies;
            }
            else if (dataObject is ProjectDependenciesNode projectDependencies)
            {
                ProjectDependencies = projectDependencies;
            }
            else if (dataObject is SdkDependenciesNode sdkDependencies)
            {
                SdkDependencies = sdkDependencies;
            }
            else if (dataObject is TargetFrameworkNode targetFramework)
            {
                TargetFrameworks.Add(targetFramework);
            }
            else if (dataObject is FrameworkReferencesNode frameworkReferences)
            {
                FrameworkReferences = frameworkReferences;
            }
        }
Exemplo n.º 2
0
        static List <FrameworkReferenceNode> GetFrameworksFolderChildDependencies(FrameworkReferencesNode node)
        {
            var nodeBuilder = new TestableFrameworkReferencesNodeBuilder();

            nodeBuilder.BuildChildNodes(null, node);
            return(nodeBuilder.ChildNodesAsFrameworkReferenceNode().ToList());
        }
Exemplo n.º 3
0
        async Task CreateDependenciesNode(IUpdatedNuGetPackagesInWorkspace updatedNuGetPackages = null)
        {
            dependenciesNodeBuilder = new TestableDependenciesNodeBuilder();
            dependenciesNode        = new DependenciesNode(project, updatedNuGetPackages ?? PackageManagementServices.UpdatedPackagesInWorkspace);
            dependenciesNode.PackageDependencyCache.PackageDependenciesChanged += PackageDependenciesChanged;
            packageDependenciesChanged = new TaskCompletionSource <bool> ();

            dependenciesNode.PackageDependencyCache.Refresh();
            dependenciesNode.FrameworkReferencesCache.Refresh();

            await WaitForPackageDependenciesChanged();

            dependenciesNodeBuilder.BuildChildNodes(null, dependenciesNode);
            nugetFolderNode      = dependenciesNodeBuilder.PackageDependencies;
            sdkFolderNode        = dependenciesNodeBuilder.SdkDependencies;
            frameworksFolderNode = dependenciesNodeBuilder.FrameworkReferences;
        }
Exemplo n.º 4
0
        async Task CreateDependenciesNode()
        {
            dependenciesNodeBuilder = new TestableDependenciesNodeBuilder();
            dependenciesNode        = new DependenciesNode(project);
            dependenciesNode.PackageDependencyCache.PackageDependenciesChanged += PackageDependenciesChanged;
            packageDependenciesChanged = new TaskCompletionSource <bool> ();

            dependenciesNode.PackageDependencyCache.Refresh();
            dependenciesNode.FrameworkReferencesCache.Refresh();

            await WaitForPackageDependenciesChanged();

            dependenciesNodeBuilder.BuildChildNodes(null, dependenciesNode);
            nugetFolderNode      = dependenciesNodeBuilder.PackageDependencies;
            sdkFolderNode        = dependenciesNodeBuilder.SdkDependencies;
            frameworksFolderNode = dependenciesNodeBuilder.FrameworkReferences;
        }