Share via


MethodData.GetMethodText Method

Returns the specified text for the specified method signature.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

Public Function GetMethodText ( _
    method As Integer, _
    type As MethodTextType _
) As IntPtr

Dim instance As MethodData
Dim method As Integer
Dim type As MethodTextType
Dim returnValue As IntPtr

returnValue = instance.GetMethodText(method, _
    type)
public IntPtr GetMethodText(
    int method,
    MethodTextType type
)
public:
virtual IntPtr GetMethodText(
    int method, 
    MethodTextType type
) sealed
public final function GetMethodText(
    method : int, 
    type : MethodTextType
) : IntPtr

Parameters

  • method
    Type: System.Int32

    [in] An index in the Methods object to the specified method signature.

Return Value

Type: System.IntPtr

If successful, returns a marshaled pointer to the requested string; otherwise, returns a null value.

Implements

IVsMethodData.GetMethodText(Int32, MethodTextType)

Remarks

This method provides access to the method delimiters, parameter separator, parameter prefix and postfix text, method name, and method description.

This method is an implementation of the GetMethodText method on the IVsMethodData interface.

The base method returns a string for the following types:

MethodTextType

What is returned

MTT_OPENBRACKET

Parameter list start string as supplied by the OpenBracket property of the Methods class.

MTT_CLOSEBRACKET

Parameter list end string as supplied by the CloseBracket property of the Methods class.

MTT_DELIMITER

Parameter separator as supplied by the Delimiter property of the Methods class.

MTT_NAME

Method name obtained by calling the GetName method on the Methods object (that was passed into the Refresh method).

MTT_DESCRIPTION

Method description obtained by calling the GetDescription method on the Methods object.

MTT_TYPEPREFIX

Method type preceded by the type prefix and followed by the type suffix as supplied by the TypePostfix property of the Methods class (assumption is type suffix is an empty or null string).

MTT_TYPEPOSTFIX

Method type preceded by the type prefix and followed by the type suffix as supplied by the TypePrefix property of the Methods class (assumption is type prefix is an empty or null string).

Permissions

See Also

Reference

MethodData Class

MethodData Members

Microsoft.VisualStudio.Package Namespace