Partager via


ITextUndoTransaction Interface

Definition

Represents a container for ITextUndoPrimitive objects. UndoTransactions are tracked in an UndoHistory.

public interface class ITextUndoTransaction : IDisposable
public interface ITextUndoTransaction : IDisposable
type ITextUndoTransaction = interface
    interface IDisposable
Public Interface ITextUndoTransaction
Implements IDisposable
Implements

Remarks

These objects are tracked in an <xref:Microsoft.VisualStudio.Text.Operations.UndoHistory>.

Properties

CanRedo

Determines whether it is currently possible to call Do() successfully.

CanUndo

Determines whether it is currently possible to call Undo() successfully.

Description

Gets or sets the description

History

Gets the ITextUndoHistory that contains this transaction.

MergePolicy

Gets the IMergeTextUndoTransactionPolicy associated with this transaction.

Parent

Gets the ITextUndoTransaction that contains this transaction.

State

Gets the UndoTransactionState for the ITextUndoTransaction.

UndoPrimitives

Gets the collection of ITextUndoPrimitive objects in this container.

Methods

AddUndo(ITextUndoPrimitive)

Adds a new primitive to the end of the list when the transaction is open.

Cancel()

Marks an open transaction as canceled, and undoes and clears any primitives that have been added.

Complete()

Marks the transaction as finished and eligible for undo.

Do()

Performs a do or redo.

Undo()

Performs a rollback or undo.

Applies to