Compartilhar via


MethodData.GetMethodText Method

Returns the specified text for the specified method signature.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaração
Public Function GetMethodText ( _
    method As Integer, _
    type As MethodTextType _
) As IntPtr
public IntPtr GetMethodText(
    int method,
    MethodTextType type
)

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).

.NET Framework Security

See Also

Reference

MethodData Class

Microsoft.VisualStudio.Package Namespace