private void RaiseUndoRedoHappened() { var list = _undoRedoHappened; if (list != null) { // Note: Passing null here as this is what Visual Studio does list(this, new TextUndoRedoEventArgs(_state, null)); } }