Ejemplo n.º 1
0
        public async Task CloseSolutionAsync()
        {
            var documentsToClose = DocumentTabs.Documents.ToList();

            foreach (var document in documentsToClose)
            {
                if (document is EditorViewModel evm)
                {
                    DocumentTabs.CloseDocument(evm);
                }
            }

            await CurrentSolution.UnloadProjectsAsync();

            await CurrentSolution.UnloadSolutionAsync();

            CurrentSolution = null;
        }
Ejemplo n.º 2
0
        public async Task CloseSolutionAsync()
        {
            // TODO clear error list?
            //IoC.Get<IErrorList>().Errors.Clear();

            if (CurrentSolution != null)
            {
                foreach (var project in CurrentSolution.Projects)
                {
                    CloseDocumentsForProject(project);
                }

                await CurrentSolution.UnloadProjectsAsync();

                await CurrentSolution.UnloadSolutionAsync();

                CurrentSolution = null;
            }
        }