示例#1
0
 public void Push(IMemento originator)
 {
     undoStack.Push(Tuple.Create(originator, originator.Memento));
     originator.SaveMemento();
     redoStack.Clear(); // Branching from timeline, so erase the current redo cache
 }