9 writes to _topUndoIndex
PresentationFramework (9)
src\Framework\MS\Internal\Documents\UndoManager.cs (9)
86_topUndoIndex = -1; 468if (++_topUndoIndex == UndoLimit) 470_topUndoIndex = 0; 758_topUndoIndex = undoStack.Count - 1; 800_topUndoIndex = UndoLimit - 1; 1001_topUndoIndex -= count; 1159_topUndoIndex = -1; 1167UndoStack[_topUndoIndex--] = null; 1171_topUndoIndex = UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
src\Framework\MS\Internal\Documents\UndoManager.cs (22)
403SetLastUnit(_topUndoIndex == -1 ? null : PeekUndoStack()); // can be null, which is fine 472if (!(_topUndoIndex < UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item 486UndoStack[_topUndoIndex] = unit; 672if (_topUndoIndex < 0 || _topUndoIndex == UndoStack.Count) 678return UndoStack[_topUndoIndex] as IUndoUnit; 737if (_bottomUndoIndex != 0 && _topUndoIndex >= 0) 742if (_bottomUndoIndex > _topUndoIndex) 751for (i=_bottomUndoIndex; i<=_topUndoIndex; i++) 789if (UndoLimit >= 0 && _topUndoIndex >= UndoLimit) 793for (int i = _topUndoIndex + 1 - UndoLimit; i <= _topUndoIndex; i++) 908if (UndoStack.Count == 0 || _topUndoIndex < 0) 912else if (_topUndoIndex == _bottomUndoIndex - 1 && PeekUndoStack() == null) 916else if (_topUndoIndex >= _bottomUndoIndex) 918count = _topUndoIndex - _bottomUndoIndex + 1; 922count = _topUndoIndex + (UndoLimit - _bottomUndoIndex) + 1; 989for (i = index + count; i <= _topUndoIndex; i++) 995for (i = _topUndoIndex - (count - 1); i <= _topUndoIndex; i++) 1166IUndoUnit unit = (IUndoUnit)UndoStack[_topUndoIndex]; 1168if (_topUndoIndex < 0 && undoCount > 0)