Пример #1
0
        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);
        }
Пример #2
0
        public override IMemento <ControlPool> Restore(ControlPool target)
        {
            IEIBControl            removed = target[index];
            IMemento <ControlPool> inverse = new RemoveControlMemento(index, removed);

            target.RemoveAt(index);
            return(inverse);
        }