Initializes a new instance of the LinkedTransaction class.
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)
Syntax
'宣言
Public Sub New ( _
description As String, _
serviceProvider As IServiceProvider _
)
'使用
Dim description As String
Dim serviceProvider As IServiceProvider
Dim instance As New LinkedTransaction(description, _
serviceProvider)
public LinkedTransaction(
string description,
IServiceProvider serviceProvider
)
public:
LinkedTransaction(
String^ description,
IServiceProvider^ serviceProvider
)
public function LinkedTransaction(
description : String,
serviceProvider : IServiceProvider
)
Parameters
description
Type: System.StringThe description that appears in the Undo/Redo list.
serviceProvider
Type: System.IServiceProviderThe service provider that is used to obtain the IVsLinkedUndoTransactionManager interface.
Remarks
When the LinkedTransaction class is initialized, this method first opens a linked undo transaction, and then the method opens an IMS transaction for the document that is open.
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.