9 writes to _topUndoIndex
PresentationFramework (9)
MS\Internal\Documents\UndoManager.cs (9)
70_topUndoIndex = -1; 430if (++_topUndoIndex == UndoLimit) 432_topUndoIndex = 0; 716_topUndoIndex = undoStack.Count - 1; 758_topUndoIndex = UndoLimit - 1; 959_topUndoIndex -= count; 1117_topUndoIndex = -1; 1125UndoStack[_topUndoIndex--] = null; 1129_topUndoIndex = UndoLimit - 1; // This should never be possible with an unlimited stack
22 references to _topUndoIndex
PresentationFramework (22)
MS\Internal\Documents\UndoManager.cs (22)
368SetLastUnit(_topUndoIndex == -1 ? null : PeekUndoStack()); // can be null, which is fine 434if (!(_topUndoIndex < UndoStack.Count && PeekUndoStack() == null) // Non-null topmost stack item 448UndoStack[_topUndoIndex] = unit; 630if (_topUndoIndex < 0 || _topUndoIndex == UndoStack.Count) 636return UndoStack[_topUndoIndex] as IUndoUnit; 695if (_bottomUndoIndex != 0 && _topUndoIndex >= 0) 700if (_bottomUndoIndex > _topUndoIndex) 709for (i = _bottomUndoIndex; i <= _topUndoIndex; i++) 747if (UndoLimit >= 0 && _topUndoIndex >= UndoLimit) 751for (int i = _topUndoIndex + 1 - UndoLimit; i <= _topUndoIndex; i++) 866if (UndoStack.Count == 0 || _topUndoIndex < 0) 870else if (_topUndoIndex == _bottomUndoIndex - 1 && PeekUndoStack() == null) 874else if (_topUndoIndex >= _bottomUndoIndex) 876count = _topUndoIndex - _bottomUndoIndex + 1; 880count = _topUndoIndex + (UndoLimit - _bottomUndoIndex) + 1; 947for (i = index + count; i <= _topUndoIndex; i++) 953for (i = _topUndoIndex - (count - 1); i <= _topUndoIndex; i++) 1124IUndoUnit unit = (IUndoUnit)UndoStack[_topUndoIndex]; 1126if (_topUndoIndex < 0 && undoCount > 0)