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.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.GraphModel.GraphUndoUnit
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public Class GraphUndoUnit
public class GraphUndoUnit
public ref class GraphUndoUnit
type GraphUndoUnit = class end
public class GraphUndoUnit
The GraphUndoUnit type exposes the following members.
Constructors
Name | Description | |
---|---|---|
GraphUndoUnit | 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. |
Top
Properties
Name | Description | |
---|---|---|
Causality | This undo unit's associated Causality. | |
Description | This undo unit's description. | |
Disabled | Whether this undo unit should be disabled (as determined by information found in the constructor). | |
IsEmpty | Whether this undo unit is empty. | |
IsRedoUnit | Whether this is a redo unit. | |
IsUndoUnit | Whether this is an undo unit. | |
ScopeProperties | The property bag associated with this undo unit. |
Top
Methods
Name | Description | |
---|---|---|
AddLink | Called during Apply if a link has to be added back to the graph. You can override this but you must call base.AddLInk. | |
AddNode | Called during Apply if a node has to be added back to the graph. You can override this but you must call base.AddNode. | |
Apply | Performs this undo or redo operation. | |
ApplyToGraph | Applies the undo unit to a different graph. | |
ApplyToNode | Applies any property or category changes on the original node to the input node. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsRedo | Determines whether the specified GraphTransactionScope is currently being used for a redo operation. | |
IsUndo | Determines whether the specified GraphTransactionScope is currently being used for an undo operation. | |
IsUndoable | 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. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RemoveLink | Called during Apply if a link has to be added back to the graph. You can override this but you must call base.RemoveLink. | |
RemoveNode | Called during Apply if a node has to be removed from to the graph. You can override this but you must call base.RemoveNode. | |
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.