Udostępnij za pośrednictwem


IVsRefactorNotify.OnBeforeAddParams Method

Definition

Called when a method is about to have the parameters added.

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

Parameters

pHier
IVsHierarchy

A 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 is about to change.

lpszRQName
String

A method that has parameters added.

cParams
UInt32

The number of parameters added.

rgszParamIndexes
UInt32[]

The indexes of the new parameters.

rgszRQTypeNames
String[]

The types of the new parameters.

rgszParamNames
String[]

The names of the new parameters.

prgAdditionalCheckoutVSITEMIDs
Array

An array of VSITEMIDs to be checked out during the add parameter operation, if the IVsRefactorNotify implementer needs to 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:

[C++]

HRESULT OnBeforeAddParams(  
    [in] IVsHierarchy *pHier,  
    [in] VSITEMID itemid,  
    [in] LPCOLESTR lpszRQName,  
    [in] ULONG cParams,  
    [in, size_is(cParams)] ULONG rgszParamIndexes[],  
    [in, size_is(cParams)] LPCOLESTR rgszRQTypeNames[],  
    [in, size_is(cParams)] LPCOLESTR rgszParamNames[],  
    [out, retval] SAFEARRAY(VSITEMID)* prgAdditionalCheckoutVSITEMIDs);  

Applies to