GraphUndoManager<T> Class

This class wraps the IOleUndoManager from Visual Studio and adds undo unit merging.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.GraphModel.GraphUndoManager<T>

Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

Syntax

'Declaration
Public MustInherit Class GraphUndoManager(Of T As GraphUndoUnit)
public abstract class GraphUndoManager<T>
where T : GraphUndoUnit
generic<typename T>
where T : GraphUndoUnit 
public ref class GraphUndoManager abstract
[<AbstractClass>]
type GraphUndoManager<'T when 'T : GraphUndoUnit> =  class end
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of GraphUndoUnit this UndoManager accepts.

The GraphUndoManager<T> type exposes the following members.

Constructors

  Name Description
Protected method GraphUndoManager<T>

Top

Properties

  Name Description
Protected property RedoStack Gets the current entries on the redo stack, ordered most to least recent.
Protected property UndoStack Gets the current entries on the undo stack, ordered most to least recent.

Top

Methods

  Name Description
Protected method Add Pushes the specified undo unit onto the undo stack.
Public method AddOrMerge Adds an undo unit to the undo stack, potentially merging it with other undo units on the stack or dropping it if it is empty. If it has UndoOption.AddForce, it will always be added, even if it is empty. This is useful for compound operations such as moving nodes, drag/drop or label editing where you merge a series of undo units into one atomic unit and you must have a sure way of starting with the Add unit even if it is at first empty.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method 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.

See Also

Reference

Microsoft.VisualStudio.GraphModel Namespace