Exemple #1
0
        internal async Task <IDictionary <string, List <EnvDTEProject> > > GetDependentEnvDTEProjectsDictionaryAsync()
        {
            // Get all of the projects in the solution and build the reverse graph. i.e.
            // if A has a project reference to B (A -> B) the this will return B -> A
            // We need to run this on the ui thread so that it doesn't freeze for websites. Since there might be a
            // large number of references.
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            Init();

            var dependentEnvDTEProjectsDictionary = new Dictionary <string, List <Project> >();
            var envDTEProjects = GetEnvDTEProjects();

            foreach (EnvDTEProject envDTEProj in envDTEProjects)
            {
                if (EnvDTEProjectUtility.SupportsReferences(envDTEProj))
                {
                    foreach (var referencedProject in EnvDTEProjectUtility.GetReferencedProjects(envDTEProj))
                    {
                        AddDependentProject(dependentEnvDTEProjectsDictionary, referencedProject, envDTEProj);
                    }
                }
            }

            return(dependentEnvDTEProjectsDictionary);
        }
Exemple #2
0
        internal IDictionary <string, List <EnvDTEProject> > GetDependentEnvDTEProjectsDictionary()
        {
            Init();

            var dependentEnvDTEProjectsDictionary = new Dictionary <string, List <Project> >();

            // Get all of the projects in the solution and build the reverse graph. i.e.
            // if A has a project reference to B (A -> B) the this will return B -> A
            // We need to run this on the ui thread so that it doesn't freeze for websites. Since there might be a
            // large number of references.
            ThreadHelper.Generic.Invoke(() =>
            {
                foreach (EnvDTEProject envDTEProj in GetEnvDTEProjects())
                {
                    if (EnvDTEProjectUtility.SupportsReferences(envDTEProj))
                    {
                        foreach (var referencedProject in EnvDTEProjectUtility.GetReferencedProjects(envDTEProj))
                        {
                            AddDependentProject(dependentEnvDTEProjectsDictionary, referencedProject, envDTEProj);
                        }
                    }
                }
            });

            return(dependentEnvDTEProjectsDictionary);
        }