Example #1
0
 //restore state of the originator
 public static void RestoreState(Originator <T> orig, int stateNumber)
 {
     orig.SetMemento(mementoList[stateNumber]);
 }
Example #2
0
 //save state of the originator
 public static void SaveState(Originator <T> orig)
 {
     mementoList.Add(orig.CreateMemento());
 }