CompoundAction Constructor
Initializes a new instance of the CompoundAction class.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'宣告
Public Sub New ( _
src As Source, _
description As String _
)
'用途
Dim src As Source
Dim description As String
Dim instance As New CompoundAction(src, description)
public CompoundAction(
Source src,
string description
)
public:
CompoundAction(
Source^ src,
String^ description
)
new :
src:Source *
description:string -> CompoundAction
public function CompoundAction(
src : Source,
description : String
)
Parameters
- src
Type: Microsoft.VisualStudio.Package.Source
[in] The Source object that represents the source file to be edited.
- description
Type: System.String
[in] A string containing a description to label the undo action.
Remarks
The constructor caches the Source object, obtains an IVsTextLines object by calling the GetTextLines method on the Source object, obtains the IVsCompoundAction interface from the IVsTextLines object, calls the OpenCompoundAction method on the IVsCompoundAction interface, and finally suspends the colorizer by calling the Suspend method on the Colorizer object obtained by calling the GetColorizer method on the Source object.
.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.