CompletionSet.GetDisplayText 方法

获取文本,并显示的图像索引在完成对指定的项列表。

命名空间:  Microsoft.VisualStudio.Package
程序集:   Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
  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 中)

语法

声明
Public Function GetDisplayText ( _
    index As Integer, _
    <OutAttribute> ByRef text As String, _
    glyph As Integer() _
) As Integer
public int GetDisplayText(
    int index,
    out string text,
    int[] glyph
)

参数

  • index
    类型:System.Int32
    [in] 获取该项的显示文本和图像项的索引。
  • text
    类型:System.String%
    [in] 返回显示文本或 nullnull 引用(在 Visual Basic 中为 Nothing) ,如果没有显示文本。
  • glyph
    类型:array<System.Int32[]
    [in, out] 返回该图像的索引显示或 -1,则图像不会显示。此参数可以是 nullnull 引用(在 Visual Basic 中为 Nothing),指示调用方不希望图像索引。

返回值

类型:System.Int32
如果成功,则返回; S_OK否则,返回错误代码。

实现

IVsCompletionSet.GetDisplayText(Int32, String%, array<Int32[])

备注

显示文本是什么在完成显示列表。该标志符号或图形是在显示文本的左侧通常会显示,并且应显示的图标的类型显示文本表示形式。例如,显示文本可能表示方法、类变量、属性或事件处理程序。在每种情况不同的图像将显示。

此方法是 GetDisplayText 方法的实现。 IVsCompletionSet 接口的。

若要检索显示文本,基方法调用传递给 Init 方法的 Declarations 对象的 GetDisplayText 方法。该基方法也称为在 Declarations 对象的 GetGlyph 方法 glyph 参数不是 nullnull 引用(在 Visual Basic 中为 Nothing)。该基方法始终返回 S_OK成功代码。

.NET Framework 安全性

请参见

参考

CompletionSet 类

Microsoft.VisualStudio.Package 命名空间