ElementLink 类

所有域关系的基类。

继承层次结构

System.Object
  Microsoft.VisualStudio.Modeling.ModelElement
    Microsoft.VisualStudio.Modeling.ElementLink
      更多...

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

语法

声明
<SerializableAttribute> _
<DomainObjectIdAttribute("706debaa-dd2d-4293-99af-695aadd36c9a")> _
<DomainRelationshipAttribute(AllowsDuplicates := True)> _
Public MustInherit Class ElementLink _
    Inherits ModelElement
[SerializableAttribute]
[DomainObjectIdAttribute("706debaa-dd2d-4293-99af-695aadd36c9a")]
[DomainRelationshipAttribute(AllowsDuplicates = true)]
public abstract class ElementLink : ModelElement

ElementLink 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 ElementLink 创建 ElementLink 类的新实例。

页首

属性

  名称 说明
公共属性 Id 获取元素的 ID。 (继承自 ModelElement。)
公共属性 IsActive 获取 IsActive 标志并验证来确定该元素是否处于活动状态。 (继承自 ModelElement。)
公共属性 IsDeleted 获取 IsDeleted 标志并检查来确定该元素是否从模型中删除。 (继承自 ModelElement。)
公共属性 IsDeleting 获取 IsDeleting 标志并验证元素是否从模型当前被删除。 (继承自 ModelElement。)
公共属性 LinkedElements 获取此元素链接连接的元素的只读集合。
公共属性 Partition 获取或设置一个元素的 Partition 。 (继承自 ModelElement。)
公共属性 Store 获取包含元素的 Store 。 (继承自 ModelElement。)

页首

方法

  名称 说明
受保护的方法 CanMerge 验证源元素是否能向该组件。 (继承自 ModelElement。)
受保护的方法 ChooseMergeTarget(ElementGroup) 选择目标元素接受作为其子元素用户要复制,拖动或创建。 (继承自 ModelElement。)
受保护的方法 ChooseMergeTarget(ElementGroupPrototype) 选择目标元素接受作为其子元素用户要复制,拖动或创建。 (继承自 ModelElement。)
公共方法 Copy() 在模型中创建元素的副本。 (继承自 ModelElement。)
公共方法 Copy(IEnumerable<Guid>) 创建组件的副本及其子链接和元素。 (继承自 ModelElement。)
公共方法 Delete() 从模型中删除某个元素。 (继承自 ModelElement。)
公共方法 Delete(array<Guid[]) 从模型中删除某个元素。 (继承自 ModelElement。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetDomainClass 获取此元素的首选派生的域类。 (继承自 ModelElement。)
公共方法 GetDomainRelationship 获取此链接实例化的域关系。
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
受保护的方法 GetRoleCollection<TCollection, TElement>(Guid) 获取或创建链接元素集合 (继承自 ModelElement。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 MergeConfigure ,在合并过程与目标元素之后,将它允许模型元素配置自身。 (继承自 ModelElement。)
受保护的方法 MergeDisconnect 从目标元素断开个源元素。 (继承自 ModelElement。)
受保护的方法 MergeRelate 创建此目标元素与指定的源元素之间的关系。 (继承自 ModelElement。)
公共方法 MoveBefore 更改链接顺序连接到元素,将该链接到另一之前。
公共方法 MoveToIndex 将此链接移到列表中的指定索引位置。
受保护的方法 OnCopy 调用时,此元素创建的另一个元素的副本。 (继承自 ModelElement。)
受保护的方法 OnDeleted 调用时,此元素从模型中删除。 (继承自 ModelElement。)
受保护的方法 OnDeleting 调用时,此元素将被删除。 (继承自 ModelElement。)
受保护的方法 OnResurrected 调用时,此元素已添加回模型。 (继承自 ModelElement。)
受保护的方法 OnRolePlayerChanged 调用,更改了角色扮演者。
受保护的方法 OnRolePlayerChanging 调用时,将更改角色扮演者。
受保护的方法 OnRolePlayerPositionChanged 调用,当角色的位置已更改。 (继承自 ModelElement。)
受保护的方法 OnRolePlayerPositionChanging 调用,当角色扮演者位置更改。 (继承自 ModelElement。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

扩展方法

  名称 说明
公共扩展方法 AddExtension(Guid) 已重载。 扩展由标识的字段类型的最新实例化的扩展的此 ModelElement。,如果元素已有该类型,扩展 InvalidOperationException 将引发异常。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 AddExtension(Type) 已重载。 扩展具有指定类型的一个新实例化的扩展的此 ModelElement。,如果元素已有该类型,扩展 InvalidOperationException 将引发异常。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 AddExtension(DomainClassInfo) 已重载。 扩展指定的字段类型的一个新实例化的扩展的此 ModelElement。,如果元素已有该类型,扩展 InvalidOperationException 将引发异常。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 AddExtension(ExtensionElement) 已重载。 扩展特定扩展的此 ModelElement。,如果元素已具有相同类型的扩展, InvalidOperationException 将引发异常。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 AddExtension<T>() 已重载。 扩展特定类型的一个新实例化的扩展的此 ModelElement。,如果元素已具有相同类型的扩展, InvalidOperationException 将引发异常。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 CanDelete 从模型中删除元素。 (由 ImmutabilityExtensionMethods 定义。)
公共扩展方法 GetAllExtensions 返回对扩展组件之间树的范围第一个遍历本 ModelElement 嵌入的可枚举的。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetBaseElement 返回指定的 ModelElement 参与虚拟麦的根。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetExtension(Guid) 已重载。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetExtension(Type) 已重载。 获取指定类型的 ExtensionElement 从此 ModelElement 可扩展的。如果元素没有此类扩展因此 InvalidOperationException 将引发。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetExtension(DomainClassInfo) 已重载。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetExtension<T>() 已重载。 获取指定类型的 ExtensionElement 从此 ModelElement 可扩展的。如果元素没有此类扩展因此 InvalidOperationException 将引发。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 GetLocks 获取此元素的锁标志。这将包括分区中启用的任何锁包含元素。 (由 ImmutabilityExtensionMethods 定义。)
公共扩展方法 IsExtendedBy(Guid) 已重载。 查询此 ModelElement 是否由特定类型的 ExtensionElement 当前扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 IsExtendedBy(Type) 已重载。 查询此 ModelElement 是否由特定类型的 ExtensionElement 当前扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 IsExtendedBy(DomainClassInfo) 已重载。 查询此 ModelElement 是否由特定类型的 ExtensionElement 当前扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 IsLocked 测试存在任何指定的此元素是否设置锁定 (由 ImmutabilityExtensionMethods 定义。)
公共扩展方法 RemoveExtension(Type) 已重载。 移除是一种特殊类型的此 ModelElement 的所有扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 RemoveExtension(Guid) 已重载。 移除是一种特殊类型指定的 ModelElement 的所有扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 RemoveExtension(DomainClassInfo) 已重载。 移除是一种特殊类型指定的 ModelElement 的所有扩展。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 RemoveExtension(ExtensionElement) 已重载。 从此 ModelElement 扩展移除指定的 ExtensionElement。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 SetLocks 将此元素锁定标志 (由 ImmutabilityExtensionMethods 定义。)
公共扩展方法 TryGetExtension(Guid) 已重载。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 TryGetExtension(Type) 已重载。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 TryGetExtension(DomainClassInfo) 已重载。 (由 ModelElementExtensionMethods 定义。)
公共扩展方法 TryGetExtension<T>() 已重载。 获取指定类型的 ExtensionElement 从此 ModelElement 可扩展的。如果此元素没有此类扩展则结果将为空。 (由 ModelElementExtensionMethods 定义。)

页首

字段

  名称 说明
公共字段静态成员 DomainClassId 域类的 ID ElementLink 的。

页首

显式接口实现

  名称 说明
显式接口实现私有方法 IMergeElements.CanMerge ,如果此元素可与原型的内容,将返回 true。 (继承自 ModelElement。)
显式接口实现私有方法 IMergeElements.ChooseMergeTarget(ElementGroup) (继承自 ModelElement。)
显式接口实现私有方法 IMergeElements.ChooseMergeTarget(ElementGroupPrototype) (继承自 ModelElement。)
显式接口实现私有方法 IMergeElements.MergeConfigure (继承自 ModelElement。)
显式接口实现私有方法 IMergeElements.MergeDisconnect (继承自 ModelElement。)
显式接口实现私有方法 IMergeElements.MergeRelate (继承自 ModelElement。)

页首

备注

在定义两 ModelElements 之间的一个字段关系在 DSL 定义时,生成的类从 ElementLink 派生。 在 DSL 运行时中的许多关系也是 ElementLinks。

因此 ElementLinks 也是 ModelElements,并且可以具有和属性由链接或边缘连接。

有关更多信息,请参见 在程序代码中导航和更新模型

示例

[重定向] 演练:创建生成的 API

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.Modeling 命名空间

继承层次结构

System.Object
  Microsoft.VisualStudio.Modeling.ModelElement
    Microsoft.VisualStudio.Modeling.ElementLink
      Microsoft.VisualStudio.Modeling.Diagrams.LinkConnectsToNode
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeContainsNestedChildShapes
      Microsoft.VisualStudio.Modeling.Diagrams.ParentShapeHasRelativeChildShapes
      Microsoft.VisualStudio.Modeling.Diagrams.PresentationViewsSubject
      Microsoft.VisualStudio.Modeling.DslDefinition.AttributedDomainElementHasAttributes
      Microsoft.VisualStudio.Modeling.DslDefinition.AttributeHasParameters
      Microsoft.VisualStudio.Modeling.DslDefinition.BaseShapeMapReferencesBaseShape
      Microsoft.VisualStudio.Modeling.DslDefinition.ClassHasBaseClass
      Microsoft.VisualStudio.Modeling.DslDefinition.ClassHasElementMergeDirectives
      Microsoft.VisualStudio.Modeling.DslDefinition.ClassHasProperties
      Microsoft.VisualStudio.Modeling.DslDefinition.ClassIndexesElementMergeDirective
      Microsoft.VisualStudio.Modeling.DslDefinition.CompartmentMapHasElementsDisplayedPath
      Microsoft.VisualStudio.Modeling.DslDefinition.CompartmentMapHasPropertyDisplayedPath
      Microsoft.VisualStudio.Modeling.DslDefinition.CompartmentMapsReferToCompartment
      Microsoft.VisualStudio.Modeling.DslDefinition.CompartmentShapeMapHasCompartmentMaps
      Microsoft.VisualStudio.Modeling.DslDefinition.ConnectionBuilderHasLinkConnectDirectives
      Microsoft.VisualStudio.Modeling.DslDefinition.ConnectorMapReferencesConnector
      Microsoft.VisualStudio.Modeling.DslDefinition.ConnectorMapReferencesRelationship
      Microsoft.VisualStudio.Modeling.DslDefinition.ConnectorToolReferencesConnectionBuilder
      Microsoft.VisualStudio.Modeling.DslDefinition.CustomPropertyDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.DecoratorMapHasPropertyDisplayedPath
      Microsoft.VisualStudio.Modeling.DslDefinition.DecoratorMapHasVisibilityPropertyPath
      Microsoft.VisualStudio.Modeling.DslDefinition.DecoratorMapReferencesDecorator
      Microsoft.VisualStudio.Modeling.DslDefinition.DesignerHasDiagram
      Microsoft.VisualStudio.Modeling.DslDefinition.DiagramElementHasDecorators
      Microsoft.VisualStudio.Modeling.DslDefinition.DiagramElementMapHasDecoratorMaps
      Microsoft.VisualStudio.Modeling.DslDefinition.DiagramHasConnectorMaps
      Microsoft.VisualStudio.Modeling.DslDefinition.DiagramHasShapeMaps
      Microsoft.VisualStudio.Modeling.DslDefinition.DiagramRepresentsClass
      Microsoft.VisualStudio.Modeling.DslDefinition.DomainClassHasCustomTypeDescriptor
      Microsoft.VisualStudio.Modeling.DslDefinition.DomainPropertyHasElementNameProvider
      Microsoft.VisualStudio.Modeling.DslDefinition.DomainRoleHasPropertyAttributes
      Microsoft.VisualStudio.Modeling.DslDefinition.DomainRoleImplementedByCollectionType
      Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinesEditor
      Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinesExplorer
      Microsoft.VisualStudio.Modeling.DslDefinition.DslDefinesExplorerBehavior
      Microsoft.VisualStudio.Modeling.DslDefinition.DslEditorIdentifiesRootClass
      Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryHasConnectionBuilders
      Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryHasDslLibraryImports
      Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryHasReferenceTypes
      Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryHasTypes
      Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryHasXmlSerializationBehavior
      Microsoft.VisualStudio.Modeling.DslDefinition.EditorHasToolboxTabs
      Microsoft.VisualStudio.Modeling.DslDefinition.EditorHasValidation
      Microsoft.VisualStudio.Modeling.DslDefinition.EditorHasXmlSerializationDefinition
      Microsoft.VisualStudio.Modeling.DslDefinition.ElementMergeDirectiveHasForwardingPath
      Microsoft.VisualStudio.Modeling.DslDefinition.ElementMergeDirectiveHasLinkCreationPaths
      Microsoft.VisualStudio.Modeling.DslDefinition.EnumerationHasAttributes
      Microsoft.VisualStudio.Modeling.DslDefinition.EnumerationHasLiterals
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerBehaviorHasNodeSettings
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerHidesNodes
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerNodeSettingsHasPropertyDisplayedPath
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerNodeSettingsReferencesClass
      Microsoft.VisualStudio.Modeling.DslDefinition.ExplorerReferencesBehavior
      Microsoft.VisualStudio.Modeling.DslDefinition.LinkConnectDirectiveHasSourceDirectives
      Microsoft.VisualStudio.Modeling.DslDefinition.LinkConnectDirectiveHasTargetDirectives
      Microsoft.VisualStudio.Modeling.DslDefinition.LinkConnectDirectiveReferencesDomainRelationship
      Microsoft.VisualStudio.Modeling.DslDefinition.ObjectToolReferencesClass
      Microsoft.VisualStudio.Modeling.DslDefinition.PathHasSegments
      Microsoft.VisualStudio.Modeling.DslDefinition.PathSegmentReferencesRole
      Microsoft.VisualStudio.Modeling.DslDefinition.PropertyHasType
      Microsoft.VisualStudio.Modeling.DslDefinition.PropertyPathHasPath
      Microsoft.VisualStudio.Modeling.DslDefinition.PropertyPathReferencesProperty
      Microsoft.VisualStudio.Modeling.DslDefinition.RelationshipHasRoles
      Microsoft.VisualStudio.Modeling.DslDefinition.RoleHasRolePlayer
      Microsoft.VisualStudio.Modeling.DslDefinition.RolePlayerConnectDirectiveAcceptsClass
      Microsoft.VisualStudio.Modeling.DslDefinition.RolePlayerConnectDirectiveHasPathToRolePlayer
      Microsoft.VisualStudio.Modeling.DslDefinition.ShapeHasCompartments
      Microsoft.VisualStudio.Modeling.DslDefinition.ShapeMapHasParentElementPath
      Microsoft.VisualStudio.Modeling.DslDefinition.ShapeMapReferencesClass
      Microsoft.VisualStudio.Modeling.DslDefinition.ToolboxTabHasTools
      Microsoft.VisualStudio.Modeling.DslDefinition.VisibilityPropertyPathHasPropertyFilters
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlClassDataAppliesToDomainClass
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlClassDataHasXmlElementData
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlElementAppliesToDomainProperty
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlRelationshipDataAppliesToDomainRelationship
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlSerializationBehaviorHasXmlClassData
      Microsoft.VisualStudio.Modeling.DslDefinition.XmlSerializationDefinitionReferencesBehavior
      Microsoft.VisualStudio.Modeling.ExtensionExtendsElement