IVsObjectList2.LocateNavigationInfo2 方法

返回列表项的索引与 VSOBNAVIGATIONINFO2 结构相对应。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)

语法

声明
Function LocateNavigationInfo2 ( _
    pobNav As VSOBNAVIGATIONINFO3(), _
    pobName As VSOBNAVNAMEINFONODE2(), _
    fDontUpdate As Integer, _
    <OutAttribute> ByRef pfMatchedName As Integer, _
    <OutAttribute> ByRef pIndex As UInteger _
) As Integer
int LocateNavigationInfo2(
    VSOBNAVIGATIONINFO3[] pobNav,
    VSOBNAVNAMEINFONODE2[] pobName,
    int fDontUpdate,
    out int pfMatchedName,
    out uint pIndex
)

参数

  • fDontUpdate
    类型:System.Int32
    [in] 标记指示不应进行更新。
  • pfMatchedName
    类型:System.Int32%
    [out] 发现 bug 指示一个匹配的名称的标志的指针。
  • pIndex
    类型:System.UInt32%
    [out] 对找到的索引的指针。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell80.idl:

[C++]

HRESULT IVsObjectList2::LocateNavigationInfo2(
   [in] VSOBNAVIGATIONINFO3 *pobNav, 
   [in] VSOBNAVNAMEINFONODE2 *pobName, 
   [in] BOOL fDontUpdate, 
   [out] BOOL *pfMatchedName, 
   [out] ULONG *pIndex
);

当对象在 对象浏览器类视图选择了,由于排序或扩展,中,环境必须重绘视图,必须维护返回选定项的路径。 该环境调用选定对象的 GetNavigationInfo2,因此,其父中的每一, ascending 直到根节点的树为止。 该环境可能然后丢弃树,通过调用 LocateNavigationInfo2 通过元素树的节点退出列表。 VSOBNAVIGATIONINFO2 结构包含库的 GUID 和名称。 pobName 参数是指向包含项目的名称和类型 VSOBNAVNAMEINFONODE framework 相关。 在找到请求的名称时,将 pIndex 对项目进行适当的值,并将 pfMatchedName 到 true。 如果 fDontUpdate 设置,因此,您无法找到请求的项目,则返回 E_FAIL。 如果 fDontUpdate 未设置,并且无法找到请求的项目,则返回 pIndex 作为 nullnull 引用(在 Visual Basic 中为 Nothing),因此,对象列表的环境重新生成。

.NET Framework 安全性

请参见

参考

IVsObjectList2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间