Partager via


IVsRefactorNotify.OnBeforeAddParams Method

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

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

Syntax

'Declaration
Function OnBeforeAddParams ( _
    pHier As IVsHierarchy, _
    itemid As UInteger, _
    lpszRQName As String, _
    cParams As UInteger, _
    rgszParamIndexes As UInteger(), _
    rgszRQTypeNames As String(), _
    rgszParamNames As String(), _
    <OutAttribute> ByRef prgAdditionalCheckoutVSITEMIDs As Array _
) As Integer
int OnBeforeAddParams(
    IVsHierarchy pHier,
    uint itemid,
    string lpszRQName,
    uint cParams,
    uint[] rgszParamIndexes,
    string[] rgszRQTypeNames,
    string[] rgszParamNames,
    out Array prgAdditionalCheckoutVSITEMIDs
)
int OnBeforeAddParams(
    [InAttribute] IVsHierarchy^ pHier, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] String^ lpszRQName, 
    [InAttribute] unsigned int cParams, 
    [InAttribute] array<unsigned int>^ rgszParamIndexes, 
    [InAttribute] array<String^>^ rgszRQTypeNames, 
    [InAttribute] array<String^>^ rgszParamNames, 
    [OutAttribute] Array^% prgAdditionalCheckoutVSITEMIDs
)
abstract OnBeforeAddParams : 
        pHier:IVsHierarchy * 
        itemid:uint32 * 
        lpszRQName:string * 
        cParams:uint32 * 
        rgszParamIndexes:uint32[] * 
        rgszRQTypeNames:string[] * 
        rgszParamNames:string[] * 
        prgAdditionalCheckoutVSITEMIDs:Array byref -> int
function OnBeforeAddParams(
    pHier : IVsHierarchy, 
    itemid : uint, 
    lpszRQName : String, 
    cParams : uint, 
    rgszParamIndexes : uint[], 
    rgszRQTypeNames : String[], 
    rgszParamNames : String[], 
    prgAdditionalCheckoutVSITEMIDs : Array
) : int

Parameters

  • itemid
    Type: UInt32

    The VSITEMID of the designer-owned item associated with the file that the language service is about to change.

  • lpszRQName
    Type: String

    A method that has parameters added.

  • cParams
    Type: UInt32

    The number of parameters added.

  • rgszParamIndexes
    Type: array<UInt32[]

    The indexes of the new parameters.

  • rgszRQTypeNames
    Type: array<String[]

    The types of the new parameters.

  • rgszParamNames
    Type: array<String[]

    The names of the new parameters.

  • prgAdditionalCheckoutVSITEMIDs
    Type: 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.

Return Value

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

.NET Framework Security

See Also

Reference

IVsRefactorNotify Interface

Microsoft.VisualStudio.Shell.Interop Namespace