ElementNameProvider.GetElementNames 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取给定容器和嵌入角色 ID 的所有唯一元素名称映射到元素。 该映射将只包含名称属性与此名称提供程序关联的元素。
protected:
System::Collections::Generic::Dictionary<System::String ^, Microsoft::VisualStudio::Modeling::ModelElement ^> ^ GetElementNames(Microsoft::VisualStudio::Modeling::ModelElement ^ container, Microsoft::VisualStudio::Modeling::DomainRoleInfo ^ embeddedDomainRole, Microsoft::VisualStudio::Modeling::ModelElement ^ excludedElement);
protected System.Collections.Generic.Dictionary<string,Microsoft.VisualStudio.Modeling.ModelElement> GetElementNames (Microsoft.VisualStudio.Modeling.ModelElement container, Microsoft.VisualStudio.Modeling.DomainRoleInfo embeddedDomainRole, Microsoft.VisualStudio.Modeling.ModelElement excludedElement);
member this.GetElementNames : Microsoft.VisualStudio.Modeling.ModelElement * Microsoft.VisualStudio.Modeling.DomainRoleInfo * Microsoft.VisualStudio.Modeling.ModelElement -> System.Collections.Generic.Dictionary<string, Microsoft.VisualStudio.Modeling.ModelElement>
Protected Function GetElementNames (container As ModelElement, embeddedDomainRole As DomainRoleInfo, excludedElement As ModelElement) As Dictionary(Of String, ModelElement)
参数
- container
- ModelElement
嵌入元素。
- embeddedDomainRole
- DomainRoleInfo
由容器嵌入的元素所扮演的域角色。
- excludedElement
- ModelElement
要从搜索中排除的元素 (可以为 null) 。
返回
字典,其中键是唯一的名称,值是给定名称的第一个查找元素。
例外
容器或 embeddedDomainRole 为 null。
GetElementNames 仅适用于 DomainProperty 的类型为字符串。