ModelElement Class

The base class for all domain model elements. All elements and links in a DomainModel are members of this type.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

[DomainObjectIdAttribute("2b13e0d1-7959-458d-834f-2dc0769ce683")]
public abstract class ModelElement : IMergeElements

The ModelElement type exposes the following members.

  NameDescription
Protected methodModelElementInitializes a new instance of the ModelElement class.
Top

  NameDescription
Public propertyIdGets the ID of the element.
Public propertyIsActiveGets the IsActive flag and verifies to see whether the element is active.
Public propertyIsDeletedGets the IsDeleted flag and checks to see whether the element has been deleted from the model.
Public propertyIsDeletingGets the IsDeleting flag and verifies whether the element is currently being deleted from the model.
Public propertyPartitionGets or sets the Partition that contains the element.
Public propertyStoreGets the Store that contains the element.
Top

  NameDescription
Public methodStatic memberAddExtension(ModelElement, DomainClassInfo)Extend the specified ModelElement with a newly instantiated extension of the specified domain type. An InvalidOperationException will be thrown if the element already has an extension of the same type.
Public methodStatic memberAddExtension(ModelElement, ExtensionElement)Extend the specified ModelElement with a specified extension. An InvalidOperationException will be thrown if the element already has an extension of the same type.
Public methodStatic memberAddExtension(ModelElement, Guid)Extend the specified ModelElement with a newly instantiated extension of the identified domain type. An InvalidOperationException will be thrown if the element already has an extension of the same type.
Public methodStatic memberAddExtension(ModelElement, Type)Extend the specified ModelElement with a newly instantiated extension of the specified type. An InvalidOperationException will be thrown if the element already has an extension of the same type.
Public methodStatic memberAddExtension<T>(ModelElement)Extend the specified ModelElement with a newly instantiated extension of a particular type. An InvalidOperationException will be thrown if the element already has an extension of the same type.
Protected methodCanMergeVerifies whether a source element can be added to this element.
Protected methodChooseMergeTarget(ElementGroup)Selects a target element to accept as its child an element that the user wants to copy, drag, or create.
Protected methodChooseMergeTarget(ElementGroupPrototype)Selects a target element to accept as its child an element that the user wants to copy, drag, or create.
Public methodCopy()Creates a copy of the element in the model.
Public methodCopy(IEnumerable<Guid>)Creates a copy of the element and its child links and elements.
Public methodDelete()Deletes an element from the model.
Public methodDelete(Guid[])Deletes an element from the model.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberGetAllExtensionsReturn an enumerable that performs a breadth first traversal across the tree of extension elements embedded in the specified ModelElement.
Public methodStatic memberGetBaseElementReturns the root of the virtual MEL in which the specified ModelElement is participating.
Public methodGetDomainClassGets the most-derived domain class for this element.
Public methodStatic memberGetExtension(ModelElement, DomainClassInfo)
Public methodStatic memberGetExtension(ModelElement, Guid)
Public methodStatic memberGetExtension(ModelElement, Type)Get the ExtensionElement of the specified type from the available extensions of the specified ModelElement. If the element has no such extension then an InvalidOperationException will be raised.
Public methodStatic memberGetExtension<T>(ModelElement)Get the ExtensionElement of the specified type from the available extensions of the specified ModelElement. If the element has no such extension then an InvalidOperationException will be raised.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetRoleCollection<TCollection, TElement>(Guid)Gets or creates the linked element collection
Protected methodStatic memberGetRoleCollection<TCollection, TElement>(ModelElement, Guid)Gets or creates the linked element collection
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberIsExtendedBy(ModelElement, DomainClassInfo)Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Public methodStatic memberIsExtendedBy(ModelElement, Guid)Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Public methodStatic memberIsExtendedBy(ModelElement, Type)Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMergeConfigureAllows the model element to configure itself immediately after the Merge process has related it to the target element.
Protected methodMergeDisconnectDisconnects a source element from a target element.
Protected methodMergeRelateCreates a relationship between this target element and the specified source element.
Protected methodOnCopyCalled when this element has been created as a copy of another element.
Protected methodOnDeletedCalled when this element has been deleted from the model.
Protected methodOnDeletingCalled when this element is about to be deleted.
Protected methodOnResurrectedCalled when this element has been added back to a model.
Protected methodOnRolePlayerPositionChangedCalled when the position of a role has changed.
Protected methodOnRolePlayerPositionChangingCalled when a role player position is about to change.
Public methodStatic memberRemoveExtension(ModelElement, DomainClassInfo)Remove any extension of the specified ModelElement that is of a particular domain type.
Public methodStatic memberRemoveExtension(ModelElement, ExtensionElement)Remove a specified ExtensionElement from the extensions of the specified ModelElement.
Public methodStatic memberRemoveExtension(ModelElement, Guid)Remove any extension of the specified ModelElement that is of a particular type.
Public methodStatic memberRemoveExtension(ModelElement, Type)Remove any extension of the specified ModelElement that is of a particular type.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodStatic memberTryGetExtension(ModelElement, DomainClassInfo)
Public methodStatic memberTryGetExtension(ModelElement, Guid)
Public methodStatic memberTryGetExtension(ModelElement, Type)
Public methodStatic memberTryGetExtension<T>(ModelElement)Get the ExtensionElement of the specified type from the available extensions of the specified ModelElement. If the element has no such extension then the result will be null.
Top

  NameDescription
Public Extension MethodAddExtension(Guid)Overloaded. Extend this ModelElement with newly instantiated extension of the identified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodAddExtension(Type)Overloaded. Extend this ModelElement with a newly instantiated extension of the specified type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodAddExtension(DomainClassInfo)Overloaded. Extend this ModelElement with a newly instantiated extension of the specified domain type. An InvalidOperationException will be thrown if the element already has an extension of that type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodAddExtension(ExtensionElement)Overloaded. Extend this ModelElement with a specific extension. An InvalidOperationException will be thrown if the element already has an extension of the same type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodAddExtension<T>()Overloaded. Extend this ModelElement with a newly instantiated extension of a particular type. An InvalidOperationException will be thrown if the element already has an extension of the same type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodCanDeleteDeletes the element from the model. (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodGetAllExtensionsReturn an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetBaseElementReturns the root of the virtual MEL in which the specified ModelElement is participating. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetExtension(Guid)Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetExtension(Type)Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetExtension(DomainClassInfo)Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetExtension<T>()Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If the element has no such extension then an InvalidOperationException will be raised. (Defined by ModelElementExtensionMethods.)
Public Extension MethodGetLocksGet the lock flags for this element. This will include any locks enabled on the Partition containing the element. (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodIsExtendedBy(Guid)Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodIsExtendedBy(Type)Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodIsExtendedBy(DomainClassInfo)Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodIsLockedTest whether this element has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodRemoveExtension(Type)Overloaded. Remove any extension of this ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodRemoveExtension(Guid)Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodRemoveExtension(DomainClassInfo)Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension MethodRemoveExtension(ExtensionElement)Overloaded. Remove a specified ExtensionElement from the extensions of this ModelElement. (Defined by ModelElementExtensionMethods.)
Public Extension MethodSetLocksSet the lock flags of this element (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodTryGetExtension(Guid)Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension MethodTryGetExtension(Type)Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension MethodTryGetExtension(DomainClassInfo)Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension MethodTryGetExtension<T>()Overloaded. Get the ExtensionElement of the specified type from the available extensions of this ModelElement. If this element has no such extension then the result will be null. (Defined by ModelElementExtensionMethods.)
Top

  NameDescription
Public fieldStatic memberDomainClassIdRepresents the ID of the domain class for this element.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft