UndoManager Class
Helper class which wraps the Visual Studio shell's undo manager.
This API is not CLS-compliant.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.Shell.UndoManager
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 UndoManager _
Implements IOleCommandTarget, IVsLinkedUndoClient, IDisposable
[CLSCompliantAttribute(false)]
public class UndoManager : IOleCommandTarget,
IVsLinkedUndoClient, IDisposable
[CLSCompliantAttribute(false)]
public ref class UndoManager : IOleCommandTarget,
IVsLinkedUndoClient, IDisposable
[<CLSCompliantAttribute(false)>]
type UndoManager =
class
interface IOleCommandTarget
interface IVsLinkedUndoClient
interface IDisposable
end
public class UndoManager implements IOleCommandTarget, IVsLinkedUndoClient, IDisposable
The UndoManager type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UndoManager(IServiceProvider) | Create an UndoManager that wraps a new instance of IOleUndoManager. | |
UndoManager(IServiceProvider, IOleUndoManager) | Create a new UndoManager with the specified service provider and IOleUndoManager. |
Top
Properties
Name | Description | |
---|---|---|
IsDirty | ||
VSUndoManager | This is what should be pushed to the SEID for a window frame that wants to use this undo manager. We can't wrap IOleUndoManager in a managed object because the property browser QI's for MS.VS.NativeMethods.IOleCommandTarget, which is private, so we can't implement it on this class. |
Top
Methods
Name | Description | |
---|---|---|
Add | Adds an undo unit to the stack and updates the UI. | |
DiscardUndoStacks | Throws away undo/redo stacks. If the bool is true, then in addition to discarding the undostack the routine will mark the stack as clean. | |
Dispose() | Releases all resources used by the current instance of the UndoManager class. | |
Dispose(Boolean) | Disposes the state of this object. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Exec | Implementation of IOleCommandTarget interface. Passes the call to the wrapped IOleUndoManager. | |
Finalize | Finalizer. (Overrides Object.Finalize().) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnInterveningUnitBlockingLinkedUndo | Indicates that the undo manager is blocking another undo manager from executing a linked action. | |
QueryStatus | Implementation of IOleCommandTarget interface. Passes call to the wrapped IOleUndoManager instance. | |
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.