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; }
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; } }