Compartir a través de


IVsHierarchyRefactorNotify.OnBeforeAddParams Method

Called when a method is about to have 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 ( _
    itemid As UInteger, _
    lpszRQName As String, _
    cParams As UInteger, _
    rgszParamIndexes As UInteger(), _
    rgszRQTypeNames As String(), _
    rgszParamNames As String(), _
    promptContinueOnFail As Integer _
) As Integer
int OnBeforeAddParams(
    uint itemid,
    string lpszRQName,
    uint cParams,
    uint[] rgszParamIndexes,
    string[] rgszRQTypeNames,
    string[] rgszParamNames,
    int promptContinueOnFail
)
int OnBeforeAddParams(
    [InAttribute] unsigned int itemid, 
    [InAttribute] String^ lpszRQName, 
    [InAttribute] unsigned int cParams, 
    [InAttribute] array<unsigned int>^ rgszParamIndexes, 
    [InAttribute] array<String^>^ rgszRQTypeNames, 
    [InAttribute] array<String^>^ rgszParamNames, 
    [InAttribute] int promptContinueOnFail
)
abstract OnBeforeAddParams : 
        itemid:uint32 * 
        lpszRQName:string * 
        cParams:uint32 * 
        rgszParamIndexes:uint32[] * 
        rgszRQTypeNames:string[] * 
        rgszParamNames:string[] * 
        promptContinueOnFail:int -> int
function OnBeforeAddParams(
    itemid : uint, 
    lpszRQName : String, 
    cParams : uint, 
    rgszParamIndexes : uint[], 
    rgszRQTypeNames : String[], 
    rgszParamNames : String[], 
    promptContinueOnFail : int
) : int

Parameters

  • itemid
    Type: UInt32

    The VSITEMID that identifies the affected file.

  • lpszRQName
    Type: String

    The method that has parameters added.

  • cParams
    Type: UInt32

    The number of added parameters.

  • rgszParamIndexes
    Type: array<UInt32[]

    The indexes of added parameters.

  • rgszRQTypeNames
    Type: array<String[]

    The types of added parameters.

  • rgszParamNames
    Type: array<String[]

    The names of added parameters.

  • promptContinueOnFail
    Type: Int32

    true to prompt the user to continue the add operation if one or more IVsRefactorNotify implementers fails; otherwise, false.

Return Value

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

Remarks

To stop the add operation, the HRESULT must contain one of the following error codes:

E_ABORT

OLE_E_PROMPTSAVECANCELLED

OLECMDERR_E_CANCELED

HR_E_CSHARP_USER_CANCEL

COM Signature

From vsshell80.idl:

HRESULT OnBeforeAddParams(
    [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[], 
    [in] BOOL promptContinueOnFail);                   

.NET Framework Security

See Also

Reference

IVsHierarchyRefactorNotify Interface

Microsoft.VisualStudio.Shell.Interop Namespace