ExpansionProvider.GetExpansionSpan 方法

返回此代码段占用的大小当前编辑。

命名空间:  Microsoft.VisualStudio.Package
程序集:   Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)

语法

声明
Public Overridable Function GetExpansionSpan As TextSpan
public virtual TextSpan GetExpansionSpan()

返回值

类型:Microsoft.VisualStudio.TextManager.Interop.TextSpan
返回表示源文件中的 TextSpan 对象代码段的大小。

备注

该基方法通过对表示当前代码段展开会话的 IVsExpansionSession 对象的 GetSnippetSpan 方法获取范围集。此方法采用展开会议由先前的设置对 InsertSpecificExpansionInsertNamedExpansion 方法。

在语言服务类的默认,当 enter 键类型化代码段中编辑过程时,托管包结构的实现,此方法在何处从 HandlePreExec 调用方法确定放置编辑器插入符号。

.NET Framework 安全性

请参见

参考

ExpansionProvider 类

Microsoft.VisualStudio.Package 命名空间