예제 #1
0
        public MementoState SaveMemento()
        {
            var savedState = new MementoState(_name, _amount);

            Stack.AddState(savedState);
            return(savedState);
        }
예제 #2
0
 public void AddState(MementoState state)
 {
     _stack.Push(state);
 }