public async Task <bool> DisposeRequest() { foreach (var doc in DocList.ToArray()) { await doc.Close.ExecuteAsync(null); if (DocList.Contains(doc)) // Закрытие отменено { return(false); } } return(true); }
private async void SaveAll_Executed(object arg) { foreach (var item in DocList.ToArray()) { try { await item.SaveIfNeeded(false); } catch (Exception exc) { ShowError(exc); } } }
public async void AutoSave() { foreach (var item in DocList.ToArray()) { try { await item.SaveIfNeeded(true); } catch (Exception exc) { ShowError(exc); } } }