public async Task<TestProject[]> GetAllTestProjectsAsync()
        {
            var testProjects = new List<TestProject>();
            var settings = _coverageSettingsStore.Read();

            foreach (var project in _solutionExplorer.Solution.Projects)
            {
                var fixtures = await GetProjectTestFixtures(project).ConfigureAwait(false);

                if (fixtures.Length > 0)
                {
                    var testProject = new TestProject();
                    testProject.Project = project.WithParseOptions(new CSharpParseOptions());
                    testProject.TestFixtures = fixtures;

                    var storedProject = settings.Projects.SingleOrDefault(x => x.Name == project.Name);

                    if (storedProject != null)
                        testProject.IsCoverageEnabled = storedProject.IsCoverageEnabled;

                    testProjects.Add(testProject);
                }
            }

            return testProjects.ToArray();
        }
        private void CreateTestProject(TestProject testProject)
        {
            var testFixturesInDocument = testProject.
               TestFixtures.Select(x => new TestFixtureViewModel(x.Identifier.ValueText)).
               ToArray();

            var testProjectViewModel = new TestProjectViewModel(_settingsStore)
            {
                TestProjectSettings = new TestProjectSettings
                {
                    Name = testProject.Project.Name,
                    IsCoverageEnabled = testProject.IsCoverageEnabled
                }
            };

            testProjectViewModel.TestFixtures = testFixturesInDocument;

            TestProjects.Add(testProjectViewModel);
        }
        private Project[] GetAllReferencedProjects(TestProject[] testProjects)
        {
            var allProjects = new List<Project>();

            foreach (var testProject in testProjects)
            {
                allProjects.Add(testProject.Project);

                AddReferencedProjects(testProject.Project, allProjects);
            }
            return allProjects.Distinct().ToArray();
        }