public void CloseDocumentsForProject(IProject project) { var documentsToClose = DocumentTabs.Documents.ToList(); foreach (var document in documentsToClose) { if (document is EditorViewModel evm && evm.SourceFile.Project == project) { DocumentTabs.CloseDocument(evm); } } }
public void RemoveDocument(IDocumentTabViewModel document) { if (document == null) { return; } if (document is EditorViewModel doc) { doc.Editor?.Save(); } DocumentTabs.CloseDocument(document); }
public void CloseSolution() { var documentsToClose = DocumentTabs.Documents.ToList(); foreach (var document in documentsToClose) { if (document is EditorViewModel evm) { DocumentTabs.CloseDocument(evm); } } CurrentSolution = null; }
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; }