Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ITextUndoTransaction Interface

Represents a container for ITextUndoPrimitive objects.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

public interface ITextUndoTransaction : IDisposable

The ITextUndoTransaction type exposes the following members.

Public propertyCanRedoDetermines whether it is currently possible to call Do successfully.
Public propertyCanUndoDetermines whether it is currently possible to call Undo() successfully.
Public propertyDescriptionGets or sets the description.
Public propertyHistoryGets the ITextUndoHistory that contains this transaction.
Public propertyMergePolicyGets the IMergeTextUndoTransactionPolicy associated with this transaction.
Public propertyParentGets the ITextUndoTransaction that contains this transaction.
Public propertyStateGets the UndoTransactionState for the ITextUndoTransaction.
Public propertyUndoPrimitivesGets the collection of ITextUndoPrimitive objects in this container.

Public methodAddUndoAdds a new undo primitive to the end of the list when the transaction is open.
Public methodCancelMarks an open transaction as canceled, but the modification is left in the file. Since the state of the buffer doesn't match the undo/redo stacks, any further attempt to undo/redo will either throw exceptions or corrupt the buffer.
Public methodCompleteMarks the transaction as finished and eligible for undo.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public methodDoPerforms a do or redo.
Public methodUndoPerforms an undo or rollback.

These objects are tracked in an UndoHistory.

© 2015 Microsoft