Share via


GraphUndoManager<T>.AddOrMerge Method

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.

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

Syntax

'Declaration
Public Function AddOrMerge ( _
    undo As T _
) As Boolean
public bool AddOrMerge(
    T undo
)
public:
bool AddOrMerge(
    T undo
)
member AddOrMerge : 
        undo:'T -> bool
public function AddOrMerge(
    undo : T
) : boolean

Parameters

  • undo
    Type: T

    The Undo unit to add.

Return Value

Type: Boolean
True if the undo unit was added or merged successfully; false if it was disregarded.

.NET Framework Security

See Also

Reference

GraphUndoManager<T> Class

Microsoft.VisualStudio.GraphModel Namespace