This topic has not yet been rated - Rate this topic

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.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
[DomainObjectIdAttribute("2b13e0d1-7959-458d-834f-2dc0769ce683")]
public abstract class ModelElement : IMergeElements

The ModelElement type exposes the following members.

  Name Description
Protected method ModelElement Initializes a new instance of the ModelElement class.
Top
  Name Description
Public property Id Gets the ID of the element.
Public property IsActive Gets the IsActive flag and verifies to see whether the element is active.
Public property IsDeleted Gets the IsDeleted flag and checks to see whether the element has been deleted from the model.
Public property IsDeleting Gets the IsDeleting flag and verifies whether the element is currently being deleted from the model.
Public property Partition Gets or sets the Partition that contains the element.
Public property Store Gets the Store that contains the element.
Top
  Name Description
Public method Static member AddExtension(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 method Static member AddExtension(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 method Static member AddExtension(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 method Static member AddExtension(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 method Static member AddExtension<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 method CanMerge Verifies whether a source element can be added to this element.
Protected method ChooseMergeTarget(ElementGroup) Selects a target element to accept as its child an element that the user wants to copy, drag, or create.
Protected method ChooseMergeTarget(ElementGroupPrototype) Selects a target element to accept as its child an element that the user wants to copy, drag, or create.
Public method Copy() Creates a copy of the element in the model.
Public method Copy(IEnumerable<Guid>) Creates a copy of the element and its child links and elements.
Public method Delete() Deletes an element from the model.
Public method Delete(Guid[]) Deletes an element from the model.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member GetAllExtensions Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in the specified ModelElement.
Public method Static member GetBaseElement Returns the root of the virtual MEL in which the specified ModelElement is participating.
Public method GetDomainClass Gets the most-derived domain class for this element.
Public method Static member GetExtension(ModelElement, DomainClassInfo)
Public method Static member GetExtension(ModelElement, Guid)
Public method Static member GetExtension(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 method Static member GetExtension<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 method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Protected method GetRoleCollection<TCollection, TElement>(Guid) Gets or creates the linked element collection
Protected method Static member GetRoleCollection<TCollection, TElement>(ModelElement, Guid) Gets or creates the linked element collection
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Static member IsExtendedBy(ModelElement, DomainClassInfo) Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Public method Static member IsExtendedBy(ModelElement, Guid) Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Public method Static member IsExtendedBy(ModelElement, Type) Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MergeConfigure Allows the model element to configure itself immediately after the Merge process has related it to the target element.
Protected method MergeDisconnect Disconnects a source element from a target element.
Protected method MergeRelate Creates a relationship between this target element and the specified source element.
Protected method OnCopy Called when this element has been created as a copy of another element.
Protected method OnDeleted Called when this element has been deleted from the model.
Protected method OnDeleting Called when this element is about to be deleted.
Protected method OnResurrected Called when this element has been added back to a model.
Protected method OnRolePlayerPositionChanged Called when the position of a role has changed.
Protected method OnRolePlayerPositionChanging Called when a role player position is about to change.
Public method Static member RemoveExtension(ModelElement, DomainClassInfo) Remove any extension of the specified ModelElement that is of a particular domain type.
Public method Static member RemoveExtension(ModelElement, ExtensionElement) Remove a specified ExtensionElement from the extensions of the specified ModelElement.
Public method Static member RemoveExtension(ModelElement, Guid) Remove any extension of the specified ModelElement that is of a particular type.
Public method Static member RemoveExtension(ModelElement, Type) Remove any extension of the specified ModelElement that is of a particular type.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Static member TryGetExtension(ModelElement, DomainClassInfo)
Public method Static member TryGetExtension(ModelElement, Guid)
Public method Static member TryGetExtension(ModelElement, Type)
Public method Static member TryGetExtension<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
  Name Description
Public Extension Method AddExtension(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 Method AddExtension(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 Method AddExtension(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 Method AddExtension(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 Method AddExtension<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 Method CanDelete Deletes the element from the model. (Defined by ImmutabilityExtensionMethods.)
Public Extension Method GetAllExtensions Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement. (Defined by ModelElementExtensionMethods.)
Public Extension Method GetBaseElement Returns the root of the virtual MEL in which the specified ModelElement is participating. (Defined by ModelElementExtensionMethods.)
Public Extension Method GetExtension(Guid) Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension Method GetExtension(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 Method GetExtension(DomainClassInfo) Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension Method GetExtension<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 Method GetLocks Get the lock flags for this element. This will include any locks enabled on the Partition containing the element. (Defined by ImmutabilityExtensionMethods.)
Public Extension Method IsExtendedBy(Guid) Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method IsExtendedBy(Type) Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method IsExtendedBy(DomainClassInfo) Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method IsLocked Test whether this element has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.)
Public Extension Method RemoveExtension(Type) Overloaded. Remove any extension of this ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method RemoveExtension(Guid) Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method RemoveExtension(DomainClassInfo) Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.)
Public Extension Method RemoveExtension(ExtensionElement) Overloaded. Remove a specified ExtensionElement from the extensions of this ModelElement. (Defined by ModelElementExtensionMethods.)
Public Extension Method SetLocks Set the lock flags of this element (Defined by ImmutabilityExtensionMethods.)
Public Extension Method TryGetExtension(Guid) Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension Method TryGetExtension(Type) Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension Method TryGetExtension(DomainClassInfo) Overloaded. (Defined by ModelElementExtensionMethods.)
Public Extension Method TryGetExtension<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
  Name Description
Public field Static member DomainClassId Represents 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.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ