Partager via


ITextUndoTransaction Interface

Represents a container for ITextUndoPrimitive objects.

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

Syntax

'Declaration
Public Interface ITextUndoTransaction _
    Inherits IDisposable
public interface ITextUndoTransaction : IDisposable
public interface class ITextUndoTransaction : IDisposable
type ITextUndoTransaction =  
    interface 
        interface IDisposable 
    end
public interface ITextUndoTransaction extends IDisposable

The ITextUndoTransaction type exposes the following members.

Properties

  Name Description
Public property CanRedo Determines whether it is currently possible to call Do successfully.
Public property CanUndo Determines whether it is currently possible to call Undo() successfully.
Public property Description Gets or sets the description.
Public property History Gets the ITextUndoHistory that contains this transaction.
Public property MergePolicy Gets the IMergeTextUndoTransactionPolicy associated with this transaction.
Public property Parent Gets the ITextUndoTransaction that contains this transaction.
Public property State Gets the UndoTransactionState for the ITextUndoTransaction.
Public property UndoPrimitives Gets the collection of ITextUndoPrimitive objects in this container.

Top

Methods

  Name Description
Public method AddUndo Adds a new undo primitive to the end of the list when the transaction is open.
Public method Cancel Marks an open transaction as canceled, and undoes and clears any undo primitives that have been added.
Public method Complete Marks the transaction as finished and eligible for undo.
Public method Dispose Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public method Do Performs a do or redo.
Public method Undo Performs an undo or rollback.

Top

Remarks

These objects are tracked in an UndoHistory.

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace