Delen via


GraphUndoUnit.IsUndoable Method

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

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.

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

Syntax

'Declaration
Public Shared Function IsUndoable ( _
    graphObject As GraphObject, _
    property As GraphProperty _
) As Boolean
public static bool IsUndoable(
    GraphObject graphObject,
    GraphProperty property
)
public:
static bool IsUndoable(
    GraphObject^ graphObject, 
    GraphProperty^ property
)
static member IsUndoable : 
        graphObject:GraphObject * 
        property:GraphProperty -> bool
public static function IsUndoable(
    graphObject : GraphObject, 
    property : GraphProperty
) : boolean

Parameters

Return Value

Type: System.Boolean
True if the property value has to be undone and redone otherwise false.

.NET Framework Security

See Also

Reference

GraphUndoUnit Class

Microsoft.VisualStudio.GraphModel Namespace