다음을 통해 공유


UndoUnit Class

Definition

Important

This API is not CLS-compliant.

Wrapper for Modeling transactions so they can be used by the shell's IOleUndoManager interface.

public ref class UndoUnit : Microsoft::VisualStudio::OLE::Interop::IOleUndoUnit
[System.CLSCompliant(false)]
public class UndoUnit : Microsoft.VisualStudio.OLE.Interop.IOleUndoUnit
public class UndoUnit : Microsoft.VisualStudio.OLE.Interop.IOleUndoUnit
[<System.CLSCompliant(false)>]
type UndoUnit = class
    interface IOleUndoUnit
type UndoUnit = class
    interface IOleUndoUnit
Public Class UndoUnit
Implements IOleUndoUnit
Inheritance
UndoUnit
Attributes
Implements

Constructors

UndoUnit(IServiceProvider, Context, TransactionCommitHandler, DescriptionHandler)

Creates an undo unit without a transaction, but with a delegate it can use to obtain the transaction later, when necessary. Also specifies a delegate that can be used to obtain the description of this action, to avoid a commit.

UndoUnit(IServiceProvider, Context, TransactionCommitHandler)

Creates an undo unit without a transaction, but with a delegate it can use to obtain the transaction later, when necessary.

UndoUnit(IServiceProvider, Context, TransactionItem)

Constructs a new undo unit.

Methods

Do(IOleUndoManager)

Performs undo/redo based on the internal state of this undo unit. Also, undo unit is responsible for adding itself to the opposite stack.

GetDescription(String)

Gets a text description for this undo unit, which is displayed by the shell

GetUnitType(Guid, Int32)

Used by undo manager to provide special handling for certain undo units based on their type -- we don't use this method

OnNextAdd()

Called when a new undo unit is added on top of this one on the undo stack. We don't need to do anything here.

Applies to