Share via


OleUndoEngine Class

Provides a default implementation of undo management for designers.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Dichiarazione
Public Class OleUndoEngine _
    Inherits UndoEngine _
    Implements IVsLinkedUndoClient
'Utilizzo
Dim instance As OleUndoEngine
public class OleUndoEngine : UndoEngine, 
    IVsLinkedUndoClient
public ref class OleUndoEngine : public UndoEngine, 
    IVsLinkedUndoClient
type OleUndoEngine =  
    class
        inherit UndoEngine
        interface IVsLinkedUndoClient
    end
public class OleUndoEngine extends UndoEngine implements IVsLinkedUndoClient

Remarks

The OleUndoEngine class provides a default implementation of the UndoEngine and IVsLinkedUndoClient interfaces used to manage undo operations, which allow users to reverse their recent changes when modifying a code element.

Nota

Typically, designers implemented under Visual Studio and .NET Framework are based on Control and have undo support automatically provided by the environment.

Designers will need to implement their own undo management if either:

  • The designer uses a graphical user interface, referred to as a ViewAdapter, other than that supplied by Control.

    This will require the registry of the ViewAdapter with Visual Studio using ProvideViewAdapterAttribute.

    An example of this might be creating a product with a web-based graphical design interface rather than a .NET Framework based graphical interface.

  • The designers do not use the Visual Studio code generation model provided in the System.CodeDom name space.

The OleUndoEngine class transparently supports child undo units, as it uses custom undo units (atomic sections of code which can be removed in an undo operation) UndoEngine.UndoUnit, which fully implement IOleUndoUnit and IOleParentUndoUnit.

Inheritance Hierarchy

System.Object
  System.ComponentModel.Design.UndoEngine
    Microsoft.VisualStudio.Shell.Design.OleUndoEngine

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

OleUndoEngine Members

Microsoft.VisualStudio.Shell.Design Namespace

UndoEngine.UndoUnit

OleUndoEngine

OnInterveningUnitBlockingLinkedUndo()

OleUndoEngine

AddUndoUnit

CreateUndoUnit

DiscardUndoUnit

Dispose

Other Resources

Supplying Undo Support to Designers