获取所有唯一的元素名称的映射,这些名称是给定的容器元素和嵌入角色 ID 的。
命名空间: Microsoft.VisualStudio.Modeling
程序集: Microsoft.VisualStudio.Modeling.Sdk.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)
语法
声明
Protected Function GetElementNames ( _
container As ModelElement, _
embeddedDomainRole As DomainRoleInfo, _
excludedElement As ModelElement _
) As Dictionary(Of String, ModelElement)
protected Dictionary<string, ModelElement> GetElementNames(
ModelElement container,
DomainRoleInfo embeddedDomainRole,
ModelElement excludedElement
)
参数
- container
类型:Microsoft.VisualStudio.Modeling.ModelElement
嵌入元素
- embeddedDomainRole
类型:Microsoft.VisualStudio.Modeling.DomainRoleInfo
由容器嵌入的元素担任的域角色。
- excludedElement
类型:Microsoft.VisualStudio.Modeling.ModelElement
排除于查找的元素 (可能为空)。
返回值
类型:System.Collections.Generic.Dictionary<String, ModelElement>
字典对象是给定名称第一个找到的元素,所有对象的键都有唯一名称和值。
异常
异常 | 条件 |
---|---|
ArgumentNullException | container 或 embeddedDomainRole 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。