예제 #1
0
 public static void RestoreState(Originator <T> orig, int stateNumber)
 {
     orig.State = list[stateNumber].State;
     // orig.SetMomento(list[stateNumber]);
 }
예제 #2
0
 public static void SaveState(Originator <T> obj)
 {
     list.Add(obj.CreateMomento());
 }