GraphUndoUnit Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

System.Object
  Microsoft.VisualStudio.GraphModel.GraphUndoUnit

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

public class GraphUndoUnit

The GraphUndoUnit type exposes the following members.

  NameDescription
Public methodGraphUndoUnitConstruct 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.
Top

  NameDescription
Public propertyCausalityThis undo unit's associated Causality.
Public propertyDescriptionThis undo unit's description.
Protected propertyDisabledWhether this undo unit should be disabled (as determined by information found in the constructor).
Public propertyIsEmptyWhether this undo unit is empty.
Public propertyIsRedoUnitWhether this is a redo unit.
Public propertyIsUndoUnitWhether this is an undo unit.
Public propertyScopePropertiesThe property bag associated with this undo unit.
Top

  NameDescription
Protected methodAddLinkCalled during Apply if a link has to be added back to the graph. You can override this but you must call base.AddLInk.
Protected methodAddNodeCalled during Apply if a node has to be added back to the graph. You can override this but you must call base.AddNode.
Public methodApplyPerforms this undo or redo operation.
Public methodApplyToGraphApplies the undo unit to a different graph.
Public methodApplyToNodeApplies any property or category changes on the original node to the input node.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberIsRedoDetermines whether the specified GraphTransactionScope is currently being used for a redo operation.
Public methodStatic memberIsUndoDetermines whether the specified GraphTransactionScope is currently being used for an undo operation.
Public methodStatic memberIsUndoableReturn 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.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodRemoveLinkCalled during Apply if a link has to be added back to the graph. You can override this but you must call base.RemoveLink.
Protected methodRemoveNodeCalled during Apply if a node has to be removed from to the graph. You can override this but you must call base.RemoveNode.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft