Пример #1
0
        /// <summary>
        /// Removes top 'count' items from given redo manager stack, returning removed undo units in a list.
        /// </summary>
        public static List <IOleUndoUnit> RemoveTopFromRedoStack(this IOleUndoManager redoManager, int count)
        {
            if (redoManager == null)
            {
                throw new ArgumentNullException("redoManager");
            }
            if (count < 0)
            {
                throw new ArgumentException("Count must be greater than or equal to zero.");
            }

            IEnumOleUndoUnits enumerator;

            redoManager.EnumRedoable(out enumerator);
            if (enumerator == null)
            {
                throw new InvalidOperationException("Redo manager seems to be incorrectly implemented.");
            }

            return(RemoveTop(redoManager, enumerator, count));
        }
Пример #2
0
 public void EnumRedoable(out IEnumOleUndoUnits ppEnum)
 {
     _wrappedUndoManager.EnumRedoable(out ppEnum);
 }