다음을 통해 공유


IVsSymbolicNavigationNotify.QueryNavigateToSymbol Method

Definition

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

public:
 int QueryNavigateToSymbol(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierCodeFile, System::UInt32 itemidCodeFile, System::String ^ pszRQName, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ % ppHierToNavigate, [Runtime::InteropServices::Out] System::UInt32 % pitemidToNavigate, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pSpanToNavigate, [Runtime::InteropServices::Out] int % pfWouldNavigate);
int QueryNavigateToSymbol(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierCodeFile, unsigned int itemidCodeFile, std::wstring const & pszRQName, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & & ppHierToNavigate, [Runtime::InteropServices::Out] unsigned int & pitemidToNavigate, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pSpanToNavigate, [Runtime::InteropServices::Out] int & pfWouldNavigate);
public int QueryNavigateToSymbol (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierCodeFile, uint itemidCodeFile, string pszRQName, out Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ppHierToNavigate, out uint pitemidToNavigate, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pSpanToNavigate, out int pfWouldNavigate);
abstract member QueryNavigateToSymbol : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * string * IVsHierarchy * uint32 * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * int -> int
Public Function QueryNavigateToSymbol (pHierCodeFile As IVsHierarchy, itemidCodeFile As UInteger, pszRQName As String, ByRef ppHierToNavigate As IVsHierarchy, ByRef pitemidToNavigate As UInteger, pSpanToNavigate As TextSpan(), ByRef pfWouldNavigate As Integer) As Integer

Parameters

pHierCodeFile
IVsHierarchy

[in] A IVsHierarchy representing the hierarchy of the code-file that the code language service would otherwise navigate to.

itemidCodeFile
UInt32

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

pszRQName
String

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

ppHierToNavigate
IVsHierarchy

[out] A IVsHierarchy representing the hierarchy of alternate navigation target that is, for the source document that generates the code file).

pitemidToNavigate
UInt32

[out] itemid for the hierarchy of alternate navigation.

pSpanToNavigate
TextSpan[]

[out] A TextSpan representing the location of symbol in alternate navigation target. Set to (0,0,0,0) if the source is not a Text document.

pfWouldNavigate
Int32

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

Returns

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  
);  

Applies to