/// <summary> /// Commits a linked undo transaction. /// </summary> public void Commit() { if (!IsActive) { throw new InvalidOperationException("This operation can only be performed when a transaction is active."); } ErrorHandler.ThrowOnFailure(_mgr.CloseLinkedUndo()); _isActive = false; }
public void Commit() { AssertIsForeground(); // once either commit or disposed is called, don't do finalizer check GC.SuppressFinalize(this); if (_transactionAlive) { _service.ActiveTransactions--; var result = _undoManager.CloseLinkedUndo(); if (result == VSConstants.UNDO_E_CLIENTABORT) { Dispose(); } else { Marshal.ThrowExceptionForHR(result); _transactionAlive = false; } } }
public void EndGlobalUndo(IVsLinkedUndoTransactionManager linkedUndo) { ErrorHandler.ThrowOnFailure(linkedUndo.CloseLinkedUndo()); }