初始化 CompoundAction 类的新实例。
命名空间: Microsoft.VisualStudio.Package
程序集: Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
语法
声明
Public Sub New ( _
src As Source, _
description As String _
)
public CompoundAction(
Source src,
string description
)
参数
- src
类型:Microsoft.VisualStudio.Package.Source
[in] 表示要编辑的源文件的 Source 对象。
- description
类型:System.String
[in] 包含描述的字符串标记来取消事件。
备注
构造函数缓存 Source 对象,通过调用 Source 对象的 GetTextLines 方法获取一 IVsTextLines 对象,从 IVsTextLines 对象的 IVsCompoundAction 接口,调用 IVsCompoundAction 接口的 OpenCompoundAction 方法并传入调用在调用获取的 Colorizer 对象的 Suspend 方法最后挂起 colorizer 在 Source 对象的 GetColorizer 方法。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。