GraphUndoUnit Class
TOC
Collapse the table of content
Expand the table of content

GraphUndoUnit Class

 

This class represents one undoable graph change which appears on the VS undo stack.

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

System.Object
  Microsoft.VisualStudio.GraphModel.GraphUndoUnit

public class GraphUndoUnit

NameDescription
System_CAPS_pubmethodGraphUndoUnit(Graph, GraphUpdatedEventArgs)

Construct an undo unit from the changes that are about to be committed in the given GraphUpdatedEventArgs.

This has to be called during the Graph Updating, the Updated event is too late because we must be able to save the old values before the changes are committed in order to be able to undo those changes.

NameDescription
System_CAPS_pubpropertyCausality

This undo unit's associated Causality.

System_CAPS_pubpropertyDescription

This undo unit's description.

System_CAPS_protpropertyDisabled

Whether this undo unit should be disabled (as determined by information found in the constructor).

System_CAPS_pubpropertyIsEmpty

Whether this undo unit is empty.

System_CAPS_pubpropertyIsRedoUnit

Whether this is a redo unit.

System_CAPS_pubpropertyIsUndoUnit

Whether this is an undo unit.

System_CAPS_pubpropertyScopeProperties

The property bag associated with this undo unit.

NameDescription
System_CAPS_protmethodAddLink(GraphLink)

Called during Apply if a link has to be added back to the graph.

You can override this but you must call base.AddLInk.

System_CAPS_protmethodAddNode(GraphNode)

Called during Apply if a node has to be added back to the graph.

You can override this but you must call base.AddNode.

System_CAPS_pubmethodApply(Action)

Performs this undo or redo operation.

System_CAPS_pubmethodApplyToGraph(Graph)

Applies the undo unit to a different graph.

System_CAPS_pubmethodApplyToNode(GraphNode, GraphNode)

Applies any property or category changes on the original node to the input node.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticIsRedo(Dictionary<Object, Object>)

Determines whether the specified GraphTransactionScope is currently being used for a redo operation.

System_CAPS_pubmethodSystem_CAPS_staticIsUndo(Dictionary<Object, Object>)

Determines whether the specified GraphTransactionScope is currently being used for an undo operation.

System_CAPS_pubmethodSystem_CAPS_staticIsUndoable(GraphObject, GraphProperty)

Return true if changes to the given property on the given graphObject are undoable or not.

This method returns true if the property metadata has the IsUndoable flag set or it returns false if it does not have the IsSharable or IsSerializable flag. Also if it has IsWriteOnce then it also returns false, because the UndoStack would not be able to change the value.

If false is returned then the property is not preserved across undo/redo.

For transient properties returning false can save lots of memory in the undo stack.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodRemoveLink(GraphLink)

Called during Apply if a link has to be added back to the graph.

You can override this but you must call base.RemoveLink.

System_CAPS_protmethodRemoveNode(GraphNode)

Called during Apply if a node has to be removed from to the graph.

You can override this but you must call base.RemoveNode.

System_CAPS_pubmethodToString()

(Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft