public MementoState SaveMemento() { var savedState = new MementoState(_name, _amount); Stack.AddState(savedState); return(savedState); }
public void AddState(MementoState state) { _stack.Push(state); }