public UndoRedoList(int capacity, CommandStack commandStack)
            : base(capacity)
        {
            // assertion
#if DEBUG
            if (commandStack == null)
            {
                throw new System.ArgumentNullException("commandStack", "commandStack parameter cannot be null");
            }
#endif

            _commandStack = commandStack;
        }
        public UndoRedoList(IEnumerable <T> enumerable, CommandStack commandStack)
            : base(enumerable)
        {
            // assertion
#if DEBUG
            if (commandStack == null)
            {
                throw new System.ArgumentNullException("commandStack", "commandStack parameter cannot be null");
            }
#endif

            _commandStack = commandStack;
        }
 public static UndoRedoList <T> ConvertToUndoRedoList <T>(this IEnumerable <T> list, CommandStack commandStack)
     where T : IModel
 => new UndoRedoList <T>(list, commandStack);