IVsObjectList.CanGoToSource Method

Returns a flag indicating if navigation to the given list item's source is supported.

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

Syntax

‘선언
Function CanGoToSource ( _
    index As UInteger, _
    SrcType As VSOBJGOTOSRCTYPE, _
    <OutAttribute> ByRef pfOK As Integer _
) As Integer
‘사용 방법
Dim instance As IVsObjectList
Dim index As UInteger
Dim SrcType As VSOBJGOTOSRCTYPE
Dim pfOK As Integer
Dim returnValue As Integer

returnValue = instance.CanGoToSource(index, _
    SrcType, pfOK)
int CanGoToSource(
    uint index,
    VSOBJGOTOSRCTYPE SrcType,
    out int pfOK
)
int CanGoToSource(
    [InAttribute] unsigned int index, 
    [InAttribute] VSOBJGOTOSRCTYPE SrcType, 
    [OutAttribute] int% pfOK
)
abstract CanGoToSource : 
        index:uint32 * 
        SrcType:VSOBJGOTOSRCTYPE * 
        pfOK:int byref -> int 
function CanGoToSource(
    index : uint, 
    SrcType : VSOBJGOTOSRCTYPE, 
    pfOK : int
) : int

Parameters

  • index
    Type: System.UInt32
    [in] Specifies the index of the list item of interest.
  • pfOK
    Type: System.Int32%
    [out] Pointer to a flag indicating whether navigation is supported.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsObjectList::CanGoToSource(
   [in] ULONG Index,
   [in] VSOBJGOTOSRCTYPE SrcType,
   [out] BOOL *pfOK
);

Return true in pfOK if navigation to the source of the specified type (definition, declaration, or reference), is possible, false otherwise. This is what enables the GoToDefinition, GoToDeclaration, and GoToReference commands in the UI. Most languages do not have a separate declaration from the definition.

.NET Framework Security

See Also

Reference

IVsObjectList Interface

IVsObjectList Members

Microsoft.VisualStudio.Shell.Interop Namespace