Graph.BeginUpdate Method (Object, String, UndoOption)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Starts a batch mode update on the Graph (which is more efficient). You must call the Complete() method on the returned GraphTransactionScope, otherwise your changes will be rolled back. The usual pattern is to use this in a using block so that if an exception is thrown the changes are automatically rolled back.
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public Function BeginUpdate ( _
undoUnitId As Object, _
undoDescription As String, _
option As UndoOption _
) As GraphTransactionScope
public GraphTransactionScope BeginUpdate(
Object undoUnitId,
string undoDescription,
UndoOption option
)
public:
GraphTransactionScope^ BeginUpdate(
Object^ undoUnitId,
String^ undoDescription,
UndoOption option
)
member BeginUpdate :
undoUnitId:Object *
undoDescription:string *
option:UndoOption -> GraphTransactionScope
public function BeginUpdate(
undoUnitId : Object,
undoDescription : String,
option : UndoOption
) : GraphTransactionScope
Parameters
undoUnitId
Type: System.ObjectFor identifying and merging.
undoDescription
Type: System.StringAn application might surface this caption as a label on the undo operations.
option
Type: Microsoft.VisualStudio.GraphModel.UndoOptionType of undo.
Return Value
Type: Microsoft.VisualStudio.GraphModel.GraphTransactionScope
A new GraphTransactionScope.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.