Share via


GraphUndoManager<T>.AddOrMerge Method (T)

 

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

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

Parameters

  • undo
    Type: T

    The Undo unit to add.

Return Value

Type: System.Boolean

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

See Also

GraphUndoManager<T> Class
Microsoft.VisualStudio.GraphModel Namespace

Return to top