共用方式為


MethodData.GetMethodText(Int32, MethodTextType) Method

Definition

Returns the specified text for the specified method signature.

public:
 virtual IntPtr GetMethodText(int method, Microsoft::VisualStudio::TextManager::Interop::MethodTextType type);
public IntPtr GetMethodText (int method, Microsoft.VisualStudio.TextManager.Interop.MethodTextType type);
abstract member GetMethodText : int * Microsoft.VisualStudio.TextManager.Interop.MethodTextType -> nativeint
override this.GetMethodText : int * Microsoft.VisualStudio.TextManager.Interop.MethodTextType -> nativeint
Public Function GetMethodText (method As Integer, type As MethodTextType) As IntPtr

Parameters

method
Int32

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

type
MethodTextType

[in] A value from the MethodTextType enumeration specifying what type of text to return.

Returns

IntPtr

nativeint

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

Implements

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

Applies to