IVsRefactorNotify.OnBeforeGlobalSymbolRenamed Method

Called when a symbol is about to be renamed.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

‘선언
Function OnBeforeGlobalSymbolRenamed ( _
    pHier As IVsHierarchy, _
    itemid As UInteger, _
    cRQNames As UInteger, _
    rglpszRQName As String(), _
    lpszNewName As String, _
    <OutAttribute> ByRef prgAdditionalCheckoutVSITEMIDs As Array _
) As Integer
‘사용 방법
Dim instance As IVsRefactorNotify
Dim pHier As IVsHierarchy
Dim itemid As UInteger
Dim cRQNames As UInteger
Dim rglpszRQName As String()
Dim lpszNewName As String
Dim prgAdditionalCheckoutVSITEMIDs As Array
Dim returnValue As Integer

returnValue = instance.OnBeforeGlobalSymbolRenamed(pHier, _
    itemid, cRQNames, rglpszRQName, lpszNewName, _
    prgAdditionalCheckoutVSITEMIDs)
int OnBeforeGlobalSymbolRenamed(
    IVsHierarchy pHier,
    uint itemid,
    uint cRQNames,
    string[] rglpszRQName,
    string lpszNewName,
    out Array prgAdditionalCheckoutVSITEMIDs
)
int OnBeforeGlobalSymbolRenamed(
    [InAttribute] IVsHierarchy^ pHier, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] unsigned int cRQNames, 
    [InAttribute] array<String^>^ rglpszRQName, 
    [InAttribute] String^ lpszNewName, 
    [OutAttribute] Array^% prgAdditionalCheckoutVSITEMIDs
)
abstract OnBeforeGlobalSymbolRenamed : 
        pHier:IVsHierarchy * 
        itemid:uint32 * 
        cRQNames:uint32 * 
        rglpszRQName:string[] * 
        lpszNewName:string * 
        prgAdditionalCheckoutVSITEMIDs:Array byref -> int 
function OnBeforeGlobalSymbolRenamed(
    pHier : IVsHierarchy, 
    itemid : uint, 
    cRQNames : uint, 
    rglpszRQName : String[], 
    lpszNewName : String, 
    prgAdditionalCheckoutVSITEMIDs : Array
) : int

Parameters

  • itemid
    Type: System.UInt32
    The VSITEMID of the designer-owned item associated with the file that the language service changed.
  • cRQNames
    Type: System.UInt32
    The number of the renamed symbols. The number can be greater than one if an overloaded symbol is renamed.
  • rglpszRQName
    Type: array<System.String[]
    A name of the symbol before the rename.
  • lpszNewName
    Type: System.String
    A name of the symbol after the rename.
  • prgAdditionalCheckoutVSITEMIDs
    Type: System.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.

Return Value

Type: System.Int32
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);

.NET Framework Security

See Also

Reference

IVsRefactorNotify Interface

IVsRefactorNotify Members

Microsoft.VisualStudio.Shell.Interop Namespace