IVsHierarchyRefactorNotify.OnBeforeGlobalSymbolRenamed(UInt32, UInt32[], UInt32, String[], String, Int32) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Chamado quando um símbolo está prestes a ser renomeado.
public:
int OnBeforeGlobalSymbolRenamed(System::UInt32 cItemsAffected, cli::array <System::UInt32> ^ rgItemsAffected, System::UInt32 cRQNames, cli::array <System::String ^> ^ rglpszRQName, System::String ^ lpszNewName, int promptContinueOnFail);
public:
int OnBeforeGlobalSymbolRenamed(unsigned int cItemsAffected, Platform::Array <unsigned int> ^ rgItemsAffected, unsigned int cRQNames, Platform::Array <Platform::String ^> ^ rglpszRQName, Platform::String ^ lpszNewName, int promptContinueOnFail);
int OnBeforeGlobalSymbolRenamed(unsigned int cItemsAffected, std::Array <unsigned int> const & rgItemsAffected, unsigned int cRQNames, std::Array <std::wstring const &> const & rglpszRQName, std::wstring const & lpszNewName, int promptContinueOnFail);
public int OnBeforeGlobalSymbolRenamed (uint cItemsAffected, uint[] rgItemsAffected, uint cRQNames, string[] rglpszRQName, string lpszNewName, int promptContinueOnFail);
abstract member OnBeforeGlobalSymbolRenamed : uint32 * uint32[] * uint32 * string[] * string * int -> int
Public Function OnBeforeGlobalSymbolRenamed (cItemsAffected As UInteger, rgItemsAffected As UInteger(), cRQNames As UInteger, rglpszRQName As String(), lpszNewName As String, promptContinueOnFail As Integer) As Integer
Parâmetros
- cItemsAffected
- UInt32
O número de arquivos afetados pela renomeação.
- rgItemsAffected
- UInt32[]
Uma matriz de VSITEMIDs que identifica os arquivos que serão afetados.
- cRQNames
- UInt32
O número de símbolos renomeados. O número pode ser maior que um, se um símbolo sobrecarregado for renomeado.
- rglpszRQName
- String[]
O nome do símbolo antes de renomear.
- lpszNewName
- String
O nome do símbolo após a renomeação.
- promptContinueOnFail
- Int32
true para solicitar que o usuário continue a operação de renomeação se um ou mais IVsRefactorNotify implementadores falharem; caso contrário, false .
Retornos
Se o método for bem-sucedido, retornará S_OK. Se falhar, retornará um código de erro.
Comentários
Para interromper a operação de renomeação, o HRESULT deve conter um dos seguintes códigos de erro:
E_ABORT
OLE_E_PROMPTSAVECANCELLED
OLECMDERR_E_CANCELED
HR_E_CSHARP_USER_CANCEL
Um símbolo com o mesmo nome pode ter mais de uma ocorrência, se o idioma permitir operações de sobrecarga, como sobrecarga de método:
void SomeMethod() {}
void SomeMethod(int i) {}
Assinatura COM
De vsshell80. idl:
HRESULT OnBeforeGlobalSymbolRenamed(
[in] ULONG cItemsAffected,
[in, size_is(cItemsAffected)] VSITEMID rgItemsAffected[],
[in] ULONG cRQNames,
[in, size_is(cRQNames)] LPCOLESTR rglpszRQName[],
[in] LPCOLESTR lpszNewName,
[in] BOOL promptContinueOnFail);