Compartilhar via


Graph.BeginUpdate Method

Definition

Overloads

BeginUpdate(Object, String, UndoOption)

Start 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.

BeginUpdate(Object, String, UndoOption, Boolean)

Start 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.

BeginUpdate(Object, String, UndoOption)

Start 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.

public:
 Microsoft::VisualStudio::GraphModel::GraphTransactionScope ^ BeginUpdate(System::Object ^ undoUnitId, System::String ^ undoDescription, Microsoft::VisualStudio::GraphModel::UndoOption option);
public Microsoft.VisualStudio.GraphModel.GraphTransactionScope BeginUpdate (object undoUnitId, string undoDescription, Microsoft.VisualStudio.GraphModel.UndoOption option);
member this.BeginUpdate : obj * string * Microsoft.VisualStudio.GraphModel.UndoOption -> Microsoft.VisualStudio.GraphModel.GraphTransactionScope
Public Function BeginUpdate (undoUnitId As Object, undoDescription As String, option As UndoOption) As GraphTransactionScope

Parameters

undoUnitId
Object

for identifying and merging

undoDescription
String

An application might surface this caption as a label on the undo operations

option
UndoOption

type of undo

Returns

A new GraphTransactionScope

Applies to

BeginUpdate(Object, String, UndoOption, Boolean)

Start 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.

public:
 Microsoft::VisualStudio::GraphModel::GraphTransactionScope ^ BeginUpdate(System::Object ^ undoUnitId, System::String ^ undoDescription, Microsoft::VisualStudio::GraphModel::UndoOption option, bool forceAdd);
public Microsoft.VisualStudio.GraphModel.GraphTransactionScope BeginUpdate (object undoUnitId, string undoDescription, Microsoft.VisualStudio.GraphModel.UndoOption option, bool forceAdd);
member this.BeginUpdate : obj * string * Microsoft.VisualStudio.GraphModel.UndoOption * bool -> Microsoft.VisualStudio.GraphModel.GraphTransactionScope
Public Function BeginUpdate (undoUnitId As Object, undoDescription As String, option As UndoOption, forceAdd As Boolean) As GraphTransactionScope

Parameters

undoUnitId
Object

for identifying and merging

undoDescription
String

An application might surface this caption as a label on the undo operations

option
UndoOption

type of undo

forceAdd
Boolean

This is only valid if the option is UndoOption.Add, which causes a new undo unit even if it is empty. This is handy when you are doing a compound operation made up of multiple merged undo units where you need to be sure the Add operation adds the initial unit even if it's empty.

Returns

A new GraphTransactionScope

Applies to