LanguageService.UpdateLanguageContext 方法
命名空间: 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 Overridable Sub UpdateLanguageContext ( _
hint As LanguageContextHint, _
buffer As IVsTextLines, _
ptsSelection As TextSpan(), _
context As IVsUserContext _
)
public virtual void UpdateLanguageContext(
LanguageContextHint hint,
IVsTextLines buffer,
TextSpan[] ptsSelection,
IVsUserContext context
)
参数
- hint
类型:Microsoft.VisualStudio.TextManager.Interop.LanguageContextHint
[in] 设置从 LanguageContextHint 枚举的标志。
- buffer
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
[in] 保留源的 IVsTextLines 对象。
- ptsSelection
类型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] 描述文本 (或当前脱字号位置) 中的选定区域的唯一 TextSpan 对象。
- context
类型:Microsoft.VisualStudio.Shell.Interop.IVsUserContext
[in] 要更新的 IVsUserContext 对象。
备注
调用此方法允许语言服务更新特定用户上下文。
该基方法不执行任何操作。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。