9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
79_topUndoIndex = -1; 439if (++_topUndoIndex == UndoLimit) 441_topUndoIndex = 0; 725_topUndoIndex = undoStack.Count - 1; 767_topUndoIndex = UndoLimit - 1; 968_topUndoIndex -= count; 1126_topUndoIndex = -1; 1134UndoStack[_topUndoIndex--] = null; 1138_topUndoIndex = UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
377SetLastUnit(_topUndoIndex == -1 ? null : PeekUndoStack()); // can be null, which is fine 443if (!(_topUndoIndex < UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item 457UndoStack[_topUndoIndex] = unit; 639if (_topUndoIndex < 0 || _topUndoIndex == UndoStack.Count) 645return UndoStack[_topUndoIndex] as IUndoUnit; 704if (_bottomUndoIndex != 0 && _topUndoIndex >= 0) 709if (_bottomUndoIndex > _topUndoIndex) 718for (i = _bottomUndoIndex; i <= _topUndoIndex; i++) 756if (UndoLimit >= 0 && _topUndoIndex >= UndoLimit) 760for (int i = _topUndoIndex + 1 - UndoLimit; i <= _topUndoIndex; i++) 875if (UndoStack.Count == 0 || _topUndoIndex < 0) 879else if (_topUndoIndex == _bottomUndoIndex - 1 && PeekUndoStack() == null) 883else if (_topUndoIndex >= _bottomUndoIndex) 885count = _topUndoIndex - _bottomUndoIndex + 1; 889count = _topUndoIndex + (UndoLimit - _bottomUndoIndex) + 1; 956for (i = index + count; i <= _topUndoIndex; i++) 962for (i = _topUndoIndex - (count - 1); i <= _topUndoIndex; i++) 1133IUndoUnit unit = (IUndoUnit)UndoStack[_topUndoIndex]; 1135if (_topUndoIndex < 0 && undoCount > 0)