/// <summary>
 /// Gets, without removing, the top memento on the redo stack.
 /// </summary>
 /// <returns></returns>
 public IMemento <T> PeekRedo()
 {
     if (redoStack.Count > 0)
     {
         return(redoStack.Peek());
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets, without removing, the top memento on the undo stack
 /// </summary>
 /// <returns></returns>
 public IMemento <T> PeekUndo()
 {
     if (_undoStack.Count > 0)
     {
         return(_undoStack.Peek());
     }
     else
     {
         return(null);
     }
 }