public override IMemento <ControlPool> Restore(ControlPool target) { int index = target.Count - 1; IMemento <ControlPool> inverse = new RemoveControlMemento(index, target[index]); target.RemoveAt(target.Count - 1); return(inverse); }
public override IMemento <ControlPool> Restore(ControlPool target) { IEIBControl removed = target[index]; IMemento <ControlPool> inverse = new RemoveControlMemento(index, removed); target.RemoveAt(index); return(inverse); }