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)

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

public class OleUndoEngine : UndoEngine, IVsLinkedUndoClient

NameDescription
System_CAPS_pubmethodOleUndoEngine(IServiceProvider)

Initializes a new instance of OleUndoEngine.

NameDescription
System_CAPS_pubpropertyEnabled

(Inherited from UndoEngine.)

System_CAPS_pubpropertyUndoInProgress

(Inherited from UndoEngine.)

NameDescription
System_CAPS_protmethodAddUndoUnit(UndoEngine.UndoUnit)

Adds the undo unit to the undo unit manager.(Overrides UndoEngine.AddUndoUnit(UndoEngine.UndoUnit).)

System_CAPS_protmethodCreateUndoUnit(String, Boolean)

Creates a new undo unit.(Overrides UndoEngine.CreateUndoUnit(String, Boolean).)

System_CAPS_protmethodDiscardUndoUnit(UndoEngine.UndoUnit)

Closes this unit if it is a parent undo unit.(Overrides UndoEngine.DiscardUndoUnit(UndoEngine.UndoUnit).)

System_CAPS_pubmethodDispose()

(Inherited from UndoEngine.)

System_CAPS_protmethodDispose(Boolean)

Disposes the resources of this object.(Overrides UndoEngine.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetRequiredService(Type)

(Inherited from UndoEngine.)

System_CAPS_protmethodGetService(Type)

(Inherited from UndoEngine.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodOnUndoing(EventArgs)

(Inherited from UndoEngine.)

System_CAPS_protmethodOnUndone(EventArgs)

(Inherited from UndoEngine.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubeventUndoing

(Inherited from UndoEngine.)

System_CAPS_pubeventUndone

(Inherited from UndoEngine.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo()

Indicates that the undo manager is blocking another undo manager from executing a linked action.

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.

System_CAPS_noteNote

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.

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

Return to top
Show: