IVsSymbolicNavigationNotify::QueryNavigateToSymbol Method (IVsHierarchy^, UInt32, String^, IVsHierarchy^, UInt32, array<TextSpan>^, Int32)

 

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)

int QueryNavigateToSymbol(
	IVsHierarchy^ pHierCodeFile,
	unsigned int itemidCodeFile,
	String^ pszRQName,
	[OutAttribute] IVsHierarchy^% ppHierToNavigate,
	[OutAttribute] unsigned int% pitemidToNavigate,
	array<TextSpan>^ pSpanToNavigate,
	[OutAttribute] int% pfWouldNavigate
)

Parameters

pHierCodeFile
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

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

itemidCodeFile
Type: System::UInt32

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

pszRQName
Type: System::String^

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

ppHierToNavigate
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

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

pitemidToNavigate
Type: System::UInt32

[out] itemid for the hierarchy of alternate navigation.

pSpanToNavigate
Type: array<Microsoft.VisualStudio.TextManager.Interop::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
Type: System::Int32

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

Return Value

Type: System::Int32

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

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

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
);
Return to top
Show: