9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
69_topUndoIndex = -1; 429if (++_topUndoIndex == UndoLimit) 431_topUndoIndex = 0; 715_topUndoIndex = undoStack.Count - 1; 757_topUndoIndex = UndoLimit - 1; 958_topUndoIndex -= count; 1116_topUndoIndex = -1; 1124UndoStack[_topUndoIndex--] = null; 1128_topUndoIndex = UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
367SetLastUnit(_topUndoIndex == -1 ? null : PeekUndoStack()); // can be null, which is fine 433if (!(_topUndoIndex < UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item 447UndoStack[_topUndoIndex] = unit; 629if (_topUndoIndex < 0 || _topUndoIndex == UndoStack.Count) 635return UndoStack[_topUndoIndex] as IUndoUnit; 694if (_bottomUndoIndex != 0 && _topUndoIndex >= 0) 699if (_bottomUndoIndex > _topUndoIndex) 708for (i = _bottomUndoIndex; i <= _topUndoIndex; i++) 746if (UndoLimit >= 0 && _topUndoIndex >= UndoLimit) 750for (int i = _topUndoIndex + 1 - UndoLimit; i <= _topUndoIndex; i++) 865if (UndoStack.Count == 0 || _topUndoIndex < 0) 869else if (_topUndoIndex == _bottomUndoIndex - 1 && PeekUndoStack() == null) 873else if (_topUndoIndex >= _bottomUndoIndex) 875count = _topUndoIndex - _bottomUndoIndex + 1; 879count = _topUndoIndex + (UndoLimit - _bottomUndoIndex) + 1; 946for (i = index + count; i <= _topUndoIndex; i++) 952for (i = _topUndoIndex - (count - 1); i <= _topUndoIndex; i++) 1123IUndoUnit unit = (IUndoUnit)UndoStack[_topUndoIndex]; 1125if (_topUndoIndex < 0 && undoCount > 0)