Partilhar via


IVsHierarchyRefactorNotify.OnGlobalSymbolRenamed Method

Definition

Called after a symbol is renamed.

public:
 int OnGlobalSymbolRenamed(System::UInt32 cItemsAffected, cli::array <System::UInt32> ^ rgItemsAffected, System::UInt32 cRQNames, cli::array <System::String ^> ^ rglpszRQName, System::String ^ lpszNewName);
public:
 int OnGlobalSymbolRenamed(unsigned int cItemsAffected, Platform::Array <unsigned int> ^ rgItemsAffected, unsigned int cRQNames, Platform::Array <Platform::String ^> ^ rglpszRQName, Platform::String ^ lpszNewName);
int OnGlobalSymbolRenamed(unsigned int cItemsAffected, std::Array <unsigned int> const & rgItemsAffected, unsigned int cRQNames, std::Array <std::wstring const &> const & rglpszRQName, std::wstring const & lpszNewName);
public int OnGlobalSymbolRenamed (uint cItemsAffected, uint[] rgItemsAffected, uint cRQNames, string[] rglpszRQName, string lpszNewName);
abstract member OnGlobalSymbolRenamed : uint32 * uint32[] * uint32 * string[] * string -> int
Public Function OnGlobalSymbolRenamed (cItemsAffected As UInteger, rgItemsAffected As UInteger(), cRQNames As UInteger, rglpszRQName As String(), lpszNewName As String) As Integer

Parameters

cItemsAffected
UInt32

The number of files affected by the rename.

rgItemsAffected
UInt32[]

An array of VSITEMIDs that identifies the affected files.

cRQNames
UInt32

The number of the renamed symbols. The number can be greater than one if an overloaded symbol is renamed.

rglpszRQName
String[]

The name of the symbol before rename.

lpszNewName
String

The name of the symbol after the rename.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

To stop the rename operation, the HRESULT must contain one of the following error codes:

E_ABORT

OLE_E_PROMPTSAVECANCELLED

OLECMDERR_E_CANCELED

HR_E_CSHARP_USER_CANCEL

A symbol with the same name may have more than one occurrence, if the language allows overloading operations, such as method overloading:

void SomeMethod() {}  
void SomeMethod(int i) {}  

COM Signature

From vsshell80.idl:

HRESULT OnGlobalSymbolRenamed(  
    [in] ULONG cItemsAffected,                                 
    [in, size_is(cItemsAffected)] VSITEMID rgItemsAffected[],  
    [in] ULONG cRQNames,                                       
    [in, size_is(cRQNames)] LPCOLESTR rglpszRQName[],          
    [in] LPCOLESTR lpszNewName);                               

Applies to