Condividi tramite


ILinkedUndoContext Interface

Use BeginTransaction to group a sequence of operations in one transaction.

Namespace:  Microsoft.VisualStudio.Modeling.ExtensionEnablement
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Dichiarazione
Public Interface ILinkedUndoContext
public interface ILinkedUndoContext
public interface class ILinkedUndoContext
type ILinkedUndoContext =  interface end
public interface ILinkedUndoContext

The ILinkedUndoContext type exposes the following members.

Methods

  Name Description
Public method BeginTransaction Group a series of changes to the model. If any change fails, you can abort the whole group, leaving the model unchanged. Call Commit() to complete the transaction. If the user calls undo, the whole group will be rolled back.

Top

Remarks

In a Visual Studio extension, you can to obtain a context from which an ILinkedUndoTransaction can be created as follows:

[Import]
public ILinkedUndoContext LinkedUndoContext { get; set; }

For more information, see How to: Link Model Updates using Transactions.

See Also

Reference

Microsoft.VisualStudio.Modeling.ExtensionEnablement Namespace