ModelExplorerTreeContainer.IsAddableRoleForElement 方法

询问指定的角色是否应视为通过资源管理器菜单的候选添加项。

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)

语法

声明
Protected Friend Overridable Function IsAddableRoleForElement ( _
    element As ModelElement, _
    role As DomainRoleInfo _
) As Boolean
protected internal virtual bool IsAddableRoleForElement(
    ModelElement element,
    DomainRoleInfo role
)

参数

返回值

类型:System.Boolean
如果该角色为附加候选,则为 true;否则为 false。

备注

默认情况下仅嵌入非抽象的元素追加是可能的,但扩展外。 可以重写,但是,不建议向包含不是 embeddings 的关系,因为资源管理器使其通过 embeddings 及其行为仅将泛型假定未定义,则这种理解有误

.NET Framework 安全性

请参阅

参考

ModelExplorerTreeContainer 类

Microsoft.VisualStudio.Modeling.Shell 命名空间