共用方式為


IVsSymbolicNavigationNotify.OnBeforeNavigateToSymbol Method

Definition

Determines if there is an alternate source file to navigate to for a code symbol.

public:
 int OnBeforeNavigateToSymbol(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierCodeFile, System::UInt32 itemidCodeFile, System::String ^ pszRQName, [Runtime::InteropServices::Out] int % pfNavigationHandled);
int OnBeforeNavigateToSymbol(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierCodeFile, unsigned int itemidCodeFile, std::wstring const & pszRQName, [Runtime::InteropServices::Out] int & pfNavigationHandled);
public int OnBeforeNavigateToSymbol (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierCodeFile, uint itemidCodeFile, string pszRQName, out int pfNavigationHandled);
abstract member OnBeforeNavigateToSymbol : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * string * int -> int
Public Function OnBeforeNavigateToSymbol (pHierCodeFile As IVsHierarchy, itemidCodeFile As UInteger, pszRQName As String, ByRef pfNavigationHandled 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

pfNavigationHandled
Int32

[out] Returns true if navigation to symbol has been handled; false if the caller should do normal navigation

Returns

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

Remarks

This method is called before a Goto Definition operation.

COM Signature

From vsshell90.idl:

HRESULT OnBeforeNavigateToSymbol(  
    [in] IVsHierarchy *pHierCodeFile,  
    [in] VSITEMID itemidCodeFile,  
    [in] LPCOLESTR pszRQName,  
    [out, retval] BOOL *pfNavigationHandled  
);  

Applies to