public static void SaveState(Originator <T> originator) { _mementos.Add(originator.CreateMemento()); }
public static void RestoreState(Originator <T> orig, int stateNumber) { Memento <T> memento = _mementos[stateNumber]; orig.SetMemento(memento); }