Пример #1
0
 public void RestoreFromUndo(Memento memento)
 {
     _title = memento.Title;
     _author = memento.Author;
     _isbn = memento.ISBN;
     _lastEdited = memento.LastEdited;
 }
Пример #2
0
 private static void RestoreBook(Book book, Memento memento)
 {
     if (memento != null && book != null)
     {
         book.RestoreFromUndo(memento);
     }
 }