Creates an instance of the UndoUnit class, which enables transactions to be undone in the store.
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)
Syntax
'宣言
Protected Overridable Function CreateUndoUnit ( _
undoableTransaction As TransactionItem _
) As UndoUnit
'使用
Dim undoableTransaction As TransactionItem
Dim returnValue As UndoUnit
returnValue = Me.CreateUndoUnit(undoableTransaction)
protected virtual UndoUnit CreateUndoUnit(
TransactionItem undoableTransaction
)
protected:
virtual UndoUnit^ CreateUndoUnit(
TransactionItem^ undoableTransaction
)
protected function CreateUndoUnit(
undoableTransaction : TransactionItem
) : UndoUnit
Parameters
undoableTransaction
Type: Microsoft.VisualStudio.Modeling.TransactionItemThe transaction to be undone.
Return Value
Type: Microsoft.VisualStudio.Modeling.Shell.UndoUnit
The UndoUnit for the store.
Remarks
The UndoUnit is a wrapper for modeling transactions. After a modeling transaction is wrapped, the shell's IOleUndoManager interface can use it.
Permissions
- 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.