Share via


IVsSymbolicNavigationNotify.QueryNavigateToSymbol Method

Returns the alternate navigation target for the symbol if there is one.

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

Syntax

'Declaration
Function QueryNavigateToSymbol ( _
    pHierCodeFile As IVsHierarchy, _
    itemidCodeFile As UInteger, _
    pszRQName As String, _
    <OutAttribute> ByRef ppHierToNavigate As IVsHierarchy, _
    <OutAttribute> ByRef pitemidToNavigate As UInteger, _
    <OutAttribute> pSpanToNavigate As TextSpan(), _
    <OutAttribute> ByRef pfWouldNavigate As Integer _
) As Integer
int QueryNavigateToSymbol(
    IVsHierarchy pHierCodeFile,
    uint itemidCodeFile,
    string pszRQName,
    out IVsHierarchy ppHierToNavigate,
    out uint pitemidToNavigate,
    TextSpan[] pSpanToNavigate,
    out int pfWouldNavigate
)
int QueryNavigateToSymbol(
    [InAttribute] IVsHierarchy^ pHierCodeFile, 
    [InAttribute] unsigned int itemidCodeFile, 
    [InAttribute] String^ pszRQName, 
    [OutAttribute] IVsHierarchy^% ppHierToNavigate, 
    [OutAttribute] unsigned int% pitemidToNavigate, 
    [OutAttribute] array<TextSpan>^ pSpanToNavigate, 
    [OutAttribute] int% pfWouldNavigate
)
abstract QueryNavigateToSymbol : 
        pHierCodeFile:IVsHierarchy * 
        itemidCodeFile:uint32 * 
        pszRQName:string * 
        ppHierToNavigate:IVsHierarchy byref * 
        pitemidToNavigate:uint32 byref * 
        pSpanToNavigate:TextSpan[] byref * 
        pfWouldNavigate:int byref -> int
function QueryNavigateToSymbol(
    pHierCodeFile : IVsHierarchy, 
    itemidCodeFile : uint, 
    pszRQName : String, 
    ppHierToNavigate : IVsHierarchy, 
    pitemidToNavigate : uint, 
    pSpanToNavigate : TextSpan[], 
    pfWouldNavigate : int
) : int

Parameters

  • itemidCodeFile
    Type: UInt32

    [in] itemid of the code-file that the code language service would otherwise navigate to

  • pszRQName
    Type: String

    [in] RQName-syntax string that identifies the symbol that is the target of the navigation

  • pitemidToNavigate
    Type: UInt32%

    [out] itemid for the hierarchy of alternate navigation.

  • pfWouldNavigate
    Type: Int32%

    [out] Returns true if alternate navigation target is returned; otherwise returns false.

Return Value

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

Remarks

This method returns an alternate navigation target if one exists, but does not actually do the navigation.

COM Signature

From vsshell90.idl:

HRESULT QueryNavigateToSymbol(
    [in] IVsHierarchy *pHierCodeFile,
    [in] VSITEMID itemidCodeFile,
    [in] LPCOLESTR pszRQName,
    [out] IVsHierarchy **ppHierToNavigate,
    [out] VSITEMID *pitemidToNavigate,
    [out] TextSpan *pSpanToNavigate,
    [out, retval] BOOL *pfWouldNavigate
);

.NET Framework Security

See Also

Reference

IVsSymbolicNavigationNotify Interface

Microsoft.VisualStudio.Shell.Interop Namespace