OleUndoEngine.UndoUnit Class
Extends support for encapsulating a unit of work that a user can undo.
Inheritance Hierarchy
System.Object
System.ComponentModel.Design.UndoEngine.UndoUnit
Microsoft.VisualStudio.Shell.Design.OleUndoEngine.UndoUnit
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Protected Class UndoUnit _
Inherits UndoEngine.UndoUnit _
Implements IOleParentUndoUnit, IOleUndoUnit
protected class UndoUnit : UndoEngine.UndoUnit,
IOleParentUndoUnit, IOleUndoUnit
protected ref class UndoUnit : public UndoEngine::UndoUnit,
IOleParentUndoUnit, IOleUndoUnit
type UndoUnit =
class
inherit UndoEngine.UndoUnit
interface IOleParentUndoUnit
interface IOleUndoUnit
end
protected class UndoUnit extends UndoEngine.UndoUnit implements IOleParentUndoUnit, IOleUndoUnit
The OleUndoEngine.UndoUnit type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
OleUndoEngine.UndoUnit | Initializes a new instance of the OleUndoEngine.UndoUnit class. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
IsEmpty | Gets a value indicating whether the UndoEngine.UndoUnit contains no events. (Inherited from UndoEngine.UndoUnit.) |
![]() |
Name | Gets the name of the UndoEngine.UndoUnit. (Inherited from UndoEngine.UndoUnit.) |
![]() |
UndoEngine | Gets the parent UndoEngine. (Inherited from UndoEngine.UndoUnit.) |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Close | Receives a call from the undo engine to close this unit. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentAdded | Receives a call from the UndoEngine in response to a ComponentAdded event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentAdding | Receives a call from the UndoEngine in response to a ComponentAdding event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentChanged | Receives a call from the UndoEngine in response to a ComponentChanged event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentChanging | Receives a call from the UndoEngine in response to a ComponentChanging event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentRemoved | Receives a call from the UndoEngine in response to a ComponentRemoved event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentRemoving | Receives a call from the UndoEngine in response to a ComponentRemoving event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
ComponentRename | Receives a call from the UndoEngine in response to a ComponentRename event. (Inherited from UndoEngine.UndoUnit.) |
![]() |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetService | Gets an instance of the requested service. (Inherited from UndoEngine.UndoUnit.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString | Returns a String that represents the current name of the unit. (Inherited from UndoEngine.UndoUnit.) |
![]() |
Undo | Performs an undo or redo action. (Inherited from UndoEngine.UndoUnit.) |
![]() |
UndoCore | Called by Undo to perform an undo action. (Inherited from UndoEngine.UndoUnit.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() |
IOleParentUndoUnit.Add | Adds an undo unit to the parent collection. |
![]() ![]() |
IOleParentUndoUnit.Close | Closes the specified parent undo unit. |
![]() ![]() |
IOleParentUndoUnit.Do | Performs the undo operation. |
![]() ![]() |
IOleParentUndoUnit.FindUnit | Searches for the specified unit in the child undo unit hierarchy. |
![]() ![]() |
IOleParentUndoUnit.GetDescription | Gets the description of the undo unit. |
![]() ![]() |
IOleParentUndoUnit.GetParentState | Gets the state of the top-level parent undo unit. |
![]() ![]() |
IOleParentUndoUnit.GetUnitType | Gets the type of the undo unit. |
![]() ![]() |
IOleParentUndoUnit.OnNextAdd | Notifies the last undo unit in the collection that a new unit has been added. |
![]() ![]() |
IOleParentUndoUnit.Open | Opens an undo unit. |
![]() ![]() |
IOleUndoUnit.Do | Performs the undo operation. |
![]() ![]() |
IOleUndoUnit.GetDescription | Gets the description of the undo unit. |
![]() ![]() |
IOleUndoUnit.GetUnitType | Gets the type of the undo unit. |
![]() ![]() |
IOleUndoUnit.OnNextAdd | Notifies the last undo unit in the collection that a new unit has been added. |
Top
Remarks
The OleUndoEngine.UndoUnit class is a nested class within OleUndoEngine that encapsulates an action that a user can undo by monitoring change notifications and builds up a list of events for each change.
It saves these events using IDesignerSerializationService. An OleUndoEngine.UndoUnit receives event notifications for changes through several methods derived from UndoEngine.UndoUnit, IOleParentUndoUnit and
By implementing UndoEngine.UndoUnit, IOleParentUndoUnit, and IOleUndoUnit, OleUndoEngine.UndoUnit is able to better support linked undo by providing explicit connection between parent and child undo units.
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.