Udostępnij za pośrednictwem


IVsRefactorNotify.OnBeforeGlobalSymbolRenamed Method

Definition

Called when a symbol is about to be renamed.

public:
 int OnBeforeGlobalSymbolRenamed(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, System::UInt32 itemid, System::UInt32 cRQNames, cli::array <System::String ^> ^ rglpszRQName, System::String ^ lpszNewName, [Runtime::InteropServices::Out] Array ^ % prgAdditionalCheckoutVSITEMIDs);
public int OnBeforeGlobalSymbolRenamed (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHier, uint itemid, uint cRQNames, string[] rglpszRQName, string lpszNewName, out Array prgAdditionalCheckoutVSITEMIDs);
abstract member OnBeforeGlobalSymbolRenamed : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * uint32 * string[] * string * Array -> int
Public Function OnBeforeGlobalSymbolRenamed (pHier As IVsHierarchy, itemid As UInteger, cRQNames As UInteger, rglpszRQName As String(), lpszNewName As String, ByRef prgAdditionalCheckoutVSITEMIDs As Array) As Integer

Parameters

pHier
IVsHierarchy

The hierarchy of the designer-owned item associated with the file that the language service changed.

itemid
UInt32

The VSITEMID of the designer-owned item associated with the file that the language service changed.

cRQNames
UInt32

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

rglpszRQName
String[]

A name of the symbol before the rename.

lpszNewName
String

A name of the symbol after the rename.

prgAdditionalCheckoutVSITEMIDs
Array

An array of VSITEMIDs to be checked out during the rename operation, if the IVsRefactorNotify implementer must modify additional files as a part of the refactoring operation. Implementers must return the VSITEMID of the designer-owned item, if that file is modified during the refactoring operation.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT OnBeforeGlobalSymbolRenamed(  
    [in] IVsHierarchy *pHier,  
    [in] VSITEMID itemid,  
    [in] ULONG cRQNames,  
    [in, size_is(cRQNames)] LPCOLESTR rglpszRQName[],  
    [in] LPCOLESTR lpszNewName,  
    [out, retval] SAFEARRAY(VSITEMID)* prgAdditionalCheckoutVSITEMIDs);  

Applies to