public void Redo(Action <HistoryEntry> redo) { if (StackRedo.Count > 0) { HistoryEntry last = StackRedo.Pop(); redo.Invoke(last); StackUndo.Push(last); } }
public IObservable <HistoryEntry> Redo(Func <HistoryEntry, IObservable <HistoryEntry> > execute) { if (StackRedo.Count == 0) { throw new Exception(); } UpdateSubjects(true); return(execute(StackRedo.Pop()).Do(entry => { StackUndo.Push(entry); UpdateSubjects(); })); }