CompletionSet.GetDisplayText Method
Gets the text and image index to display in the completion list for the specified item.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
‘선언
Public Function GetDisplayText ( _
index As Integer, _
<OutAttribute> ByRef text As String, _
glyph As Integer() _
) As Integer
‘사용 방법
Dim instance As CompletionSet
Dim index As Integer
Dim text As String
Dim glyph As Integer()
Dim returnValue As Integer
returnValue = instance.GetDisplayText(index, _
text, glyph)
public int GetDisplayText(
int index,
out string text,
int[] glyph
)
public:
virtual int GetDisplayText(
int index,
[OutAttribute] String^% text,
array<int>^ glyph
) sealed
abstract GetDisplayText :
index:int *
text:string byref *
glyph:int[] -> int
override GetDisplayText :
index:int *
text:string byref *
glyph:int[] -> int
public final function GetDisplayText(
index : int,
text : String,
glyph : int[]
) : int
Parameters
- index
Type: System.Int32
[in] The index of the item for which to get the display text and image.
- text
Type: System.String%
[out] Returns the display text, or nulla null reference (Nothing in Visual Basic) if there is no display text.
- glyph
Type: array<System.Int32[]
[in, out] Returns the index of the image to display, or -1 if no image is to be displayed. This parameter can be nulla null reference (Nothing in Visual Basic), indicating the caller does not want the image index.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
IVsCompletionSet.GetDisplayText(Int32, String%, array<Int32[])
Remarks
The display text is what is shown in the completion list. The glyph or image is an icon that is typically displayed to the left of the display text and should indicate what type the display text represents. For example, the display text might represent a method, a class variable, a property, or an event handler. In each case a different image would be shown.
This method is an implementation of the GetDisplayText method on the IVsCompletionSet interface.
To retrieve the display text, the base method calls the GetDisplayText method on the Declarations object that was passed to the Init method. The base method also calls the GetGlyph method on the Declarations object if the glyph parameter is not nulla null reference (Nothing in Visual Basic). The base method always returns a success code of S_OK.
.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.