FlavoredProject.GetCanonicalName 方法

获取唯一名称与在层次结构中的项。用于工作区持久性,例如确保窗口位置。

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

语法

声明
Protected Overridable Function GetCanonicalName ( _
    itemId As UInteger, _
    <OutAttribute> ByRef name As String _
) As Integer
protected virtual int GetCanonicalName(
    uint itemId,
    out string name
)

参数

  • name
    类型:System.String%
    [out] 层次结构项目的规范名称。

返回值

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

备注

此方法调用内层项目的 GetCanonicalName 。

规范名称不会更改该环境的会话之间,但是,项 ID。使用此方法控制工作区持久性,例如确保窗口位置。

.NET Framework 安全性

请参见

参考

FlavoredProject 类

Microsoft.VisualStudio.Shell.Flavor 命名空间