ModelElement Class
Visual Studio 2012
The base class for all domain model elements. All elements and links in a DomainModel are members of this type.
Object
Microsoft.VisualStudio.Modeling.ModelElement
Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement
Microsoft.VisualStudio.Modeling.DslDefinition.DomainElement
Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryImport
Microsoft.VisualStudio.Modeling.ElementLink
Microsoft.VisualStudio.Modeling.ExtensionElement
Microsoft.VisualStudio.Modeling.ModelElement
Microsoft.VisualStudio.Modeling.Diagrams.PresentationElement
Microsoft.VisualStudio.Modeling.DslDefinition.DomainElement
Microsoft.VisualStudio.Modeling.DslDefinition.DslLibraryImport
Microsoft.VisualStudio.Modeling.ElementLink
Microsoft.VisualStudio.Modeling.ExtensionElement
Assembly: Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
The ModelElement type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Id | Gets the ID of the element. |
![]() | IsActive | Gets the IsActive flag and verifies to see whether the element is active. |
![]() | IsDeleted | Gets the IsDeleted flag and checks to see whether the element has been deleted from the model. |
![]() | IsDeleting | Gets the IsDeleting flag and verifies whether the element is currently being deleted from the model. |
![]() | Partition | Gets or sets the Partition that contains the element. |
![]() | Store | Gets the Store that contains the element. |
| Name | Description | |
|---|---|---|
![]() ![]() | 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. |
![]() ![]() | 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. |
![]() ![]() | 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. |
![]() ![]() | 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. |
![]() ![]() | 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. |
![]() | CanMerge | Verifies whether a source element can be added to this element. |
![]() | ChooseMergeTarget(ElementGroup) | Selects a target element to accept as its child an element that the user wants to copy, drag, or create. |
![]() | ChooseMergeTarget(ElementGroupPrototype) | Selects a target element to accept as its child an element that the user wants to copy, drag, or create. |
![]() | Copy() | Creates a copy of the element in the model. |
![]() | Copy(IEnumerable<Guid>) | Creates a copy of the element and its child links and elements. |
![]() | Delete() | Deletes an element from the model. |
![]() | Delete(Guid[]) | Deletes an element from the model. |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetAllExtensions | Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in the specified ModelElement. |
![]() ![]() | GetBaseElement | Returns the root of the virtual MEL in which the specified ModelElement is participating. |
![]() | GetDomainClass | Gets the most-derived domain class for this element. |
![]() ![]() | GetExtension(ModelElement, DomainClassInfo) | |
![]() ![]() | GetExtension(ModelElement, Guid) | |
![]() ![]() | 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. |
![]() ![]() | 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. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetRoleCollection<TCollection, TElement>(Guid) | Gets or creates the linked element collection |
![]() ![]() | GetRoleCollection<TCollection, TElement>(ModelElement, Guid) | Gets or creates the linked element collection |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | IsExtendedBy(ModelElement, DomainClassInfo) | Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type. |
![]() ![]() | IsExtendedBy(ModelElement, Guid) | Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type. |
![]() ![]() | IsExtendedBy(ModelElement, Type) | Query whether the specified ModelElement is currently extended by an ExtensionElement of a particular type. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MergeConfigure | Allows the model element to configure itself immediately after the Merge process has related it to the target element. |
![]() | MergeDisconnect | Disconnects a source element from a target element. |
![]() | MergeRelate | Creates a relationship between this target element and the specified source element. |
![]() | OnCopy | Called when this element has been created as a copy of another element. |
![]() | OnDeleted | Called when this element has been deleted from the model. |
![]() | OnDeleting | Called when this element is about to be deleted. |
![]() | OnResurrected | Called when this element has been added back to a model. |
![]() | OnRolePlayerPositionChanged | Called when the position of a role has changed. |
![]() | OnRolePlayerPositionChanging | Called when a role player position is about to change. |
![]() ![]() | RemoveExtension(ModelElement, DomainClassInfo) | Remove any extension of the specified ModelElement that is of a particular domain type. |
![]() ![]() | RemoveExtension(ModelElement, ExtensionElement) | Remove a specified ExtensionElement from the extensions of the specified ModelElement. |
![]() ![]() | RemoveExtension(ModelElement, Guid) | Remove any extension of the specified ModelElement that is of a particular type. |
![]() ![]() | RemoveExtension(ModelElement, Type) | Remove any extension of the specified ModelElement that is of a particular type. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() ![]() | TryGetExtension(ModelElement, DomainClassInfo) | |
![]() ![]() | TryGetExtension(ModelElement, Guid) | |
![]() ![]() | TryGetExtension(ModelElement, Type) | |
![]() ![]() | 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. |
| Name | Description | |
|---|---|---|
![]() | 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.) |
![]() | 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.) |
![]() | 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.) |
![]() | 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.) |
![]() | 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.) |
![]() | CanDelete | Deletes the element from the model. (Defined by ImmutabilityExtensionMethods.) |
![]() | GetAllExtensions | Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement. (Defined by ModelElementExtensionMethods.) |
![]() | GetBaseElement | Returns the root of the virtual MEL in which the specified ModelElement is participating. (Defined by ModelElementExtensionMethods.) |
![]() | GetExtension(Guid) | Overloaded. (Defined by ModelElementExtensionMethods.) |
![]() | 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.) |
![]() | GetExtension(DomainClassInfo) | Overloaded. (Defined by ModelElementExtensionMethods.) |
![]() | 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.) |
![]() | GetLocks | Get the lock flags for this element. This will include any locks enabled on the Partition containing the element. (Defined by ImmutabilityExtensionMethods.) |
![]() | IsExtendedBy(Guid) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | IsExtendedBy(Type) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | IsExtendedBy(DomainClassInfo) | Overloaded. Query whether this ModelElement is currently extended by an ExtensionElement of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | IsLocked | Test whether this element has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.) |
![]() | RemoveExtension(Type) | Overloaded. Remove any extension of this ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | RemoveExtension(Guid) | Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | RemoveExtension(DomainClassInfo) | Overloaded. Remove any extension of the specified ModelElement that is of a particular type. (Defined by ModelElementExtensionMethods.) |
![]() | RemoveExtension(ExtensionElement) | Overloaded. Remove a specified ExtensionElement from the extensions of this ModelElement. (Defined by ModelElementExtensionMethods.) |
![]() | SetLocks | Set the lock flags of this element (Defined by ImmutabilityExtensionMethods.) |
![]() | TryGetExtension(Guid) | Overloaded. (Defined by ModelElementExtensionMethods.) |
![]() | TryGetExtension(Type) | Overloaded. (Defined by ModelElementExtensionMethods.) |
![]() | TryGetExtension(DomainClassInfo) | Overloaded. (Defined by ModelElementExtensionMethods.) |
![]() | 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.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IMergeElements.CanMerge | Returns true if this element can merge with the content of the prototype. |
![]() ![]() | IMergeElements.ChooseMergeTarget(ElementGroup) | |
![]() ![]() | IMergeElements.ChooseMergeTarget(ElementGroupPrototype) | |
![]() ![]() | IMergeElements.MergeConfigure | |
![]() ![]() | IMergeElements.MergeDisconnect | |
![]() ![]() | IMergeElements.MergeRelate |
For more information, see Navigating and Updating a Model in Program Code.
