UndoUnit Class
Wrapper for Modeling transactions so they can be used by the shell's IOleUndoManager interface.
This API is not CLS-compliant.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.Shell.UndoUnit
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
'Declaração
<CLSCompliantAttribute(False)> _
Public Class UndoUnit _
Implements IOleUndoUnit
[CLSCompliantAttribute(false)]
public class UndoUnit : IOleUndoUnit
[CLSCompliantAttribute(false)]
public ref class UndoUnit : IOleUndoUnit
[<CLSCompliantAttribute(false)>]
type UndoUnit =
class
interface IOleUndoUnit
end
public class UndoUnit implements IOleUndoUnit
The UndoUnit type exposes the following members.
Constructors
Name | Description | |
---|---|---|
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. | |
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. |
Top
Methods
Name | Description | |
---|---|---|
Do | Performs undo/redo based on the internal state of this undo unit. Also, undo unit is responsible for adding itself to the *opposite* stack. | |
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.) | |
GetDescription | Gets a text description for this undo unit, which is displayed by the shell | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUnitType | Used by undo manager to provide special handling for certain undo units based on their type -- we don't use this method | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
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. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
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.