IVsObjectList.GoToSource Method

Navigates to the source for the given list item.

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

Syntax

‘선언
Function GoToSource ( _
    index As UInteger, _
    SrcType As VSOBJGOTOSRCTYPE _
) As Integer
‘사용 방법
Dim instance As IVsObjectList
Dim index As UInteger
Dim SrcType As VSOBJGOTOSRCTYPE
Dim returnValue As Integer

returnValue = instance.GoToSource(index, _
    SrcType)
int GoToSource(
    uint index,
    VSOBJGOTOSRCTYPE SrcType
)
int GoToSource(
    [InAttribute] unsigned int index, 
    [InAttribute] VSOBJGOTOSRCTYPE SrcType
)
abstract GoToSource : 
        index:uint32 * 
        SrcType:VSOBJGOTOSRCTYPE -> int 
function GoToSource(
    index : uint, 
    SrcType : VSOBJGOTOSRCTYPE
) : int

Parameters

  • index
    Type: System.UInt32
    [in] Specifies the index of the list item of interest.

Return Value

Type: System.Int32
This returns S_OK on success or an hr error (along with rich error information if possible) if the navigation failed.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsObjectList::GoToSource(
   [in] ULONG Index,
   [in] VSOBJGOTOSRCTYPE SrcType
);

The environment calls GoToSource when the user invokes GoToDefinition, GoToDeclaration, or GoToReference commands provided CanGoToSource returned true. You must navigate to the source for the item, coordinating with your project system, the running document table, and the text editor to actually open the containing source file and navigate to the appropriate line. Also open the appropriate editor's navigation context so that editor's back/forward navigation functions correctly.

.NET Framework Security

See Also

Reference

IVsObjectList Interface

IVsObjectList Members

Microsoft.VisualStudio.Shell.Interop Namespace