예제 #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);
        }