示例#1
0
文件: CareTaker.cs 项目: chengn/DPRun
 /// <summary>
 /// 保存一个备忘录
 /// </summary>
 /// <param name="memento"></param>
 public void SaveMemento(Memento memento)
 {
     this.memento = memento;
 }
示例#2
0
 /// <summary>
 /// 恢复当前状态为备忘录所保存的状态
 /// </summary>
 /// <param name="memento"></param>
 public void RestoreMemento(Memento memento)
 {
     this.state = memento.GetState();
 }