/// <see cref="IDiagramManager.Close"/> public void Close() { OnClosing(); var unsavedOpenDiagrams = OpenDiagrams.Where(od => od.CodeEditor.IsModified).ToList(); foreach (var openDiagram in unsavedOpenDiagrams) { openDiagram.Close(); } Task.WaitAll(_editorSaveTasks.ToArray()); }
/// <see cref="IDiagramManager.SaveAllAsync"/> public async Task SaveAllAsync() { await OpenDiagrams.Where(d => d.CanSave).Select(d => d.SaveAsync()); }