Esempio n. 1
0
 public void Restore(ResourceMemento Memento)
 {
     if (Memento.Type == this.Type)
     {
         this.Amount = Memento.Amount;
     }
 }
Esempio n. 2
0
        public ResourceMemento CreateMemento()
        {
            ResourceMemento Memento = new ResourceMemento();

            Memento.Amount = this.Amount;
            Memento.Type   = this.Type;
            return(Memento);
        }
 public FieldMemento()
 {
     this.State    = FieldStateNormal.GetInstance();
     this.Resource = null;
 }