/// <summary> /// Creates <see cref="UndoRedoHistory<T>"/> with given capacity. /// </summary> /// <param name="subject"></param> /// <param name="capacity"></param> public UndoRedoHistory(T subject, int capacity) { this.subject = subject; undoStack = new RoundStack <IMemento <T> >(capacity); redoStack = new RoundStack <IMemento <T> >(capacity); }