ModelElementExtensionMethods Class

 

These extension methods allow a DSL to be extended without altering the original definition.

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

System.Object
  Microsoft.VisualStudio.Modeling.Extensibility.ModelElementExtensionMethods

public static class ModelElementExtensionMethods

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAddExtension(ModelElement, DomainClassInfo)

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.

System_CAPS_pubmethodSystem_CAPS_staticAddExtension(ModelElement, ExtensionElement)

Extend this ModelElement with a specific extension. An InvalidOperationException will be thrown if the element already has an extension of the same type.

System_CAPS_pubmethodSystem_CAPS_staticAddExtension(ModelElement, Guid)

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.

System_CAPS_pubmethodSystem_CAPS_staticAddExtension(ModelElement, Type)

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.

System_CAPS_pubmethodSystem_CAPS_staticAddExtension<T>(ModelElement)

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.

System_CAPS_pubmethodSystem_CAPS_staticGetAllExtensions(ModelElement)

Return an enumerable that performs a breadth first traversal across the tree of extension elements embedded in this ModelElement.

System_CAPS_pubmethodSystem_CAPS_staticGetBaseElement(ModelElement)

Returns the root of the virtual MEL in which the specified ModelElement is participating.

System_CAPS_pubmethodSystem_CAPS_staticGetExtension(ModelElement, DomainClassInfo)

System_CAPS_pubmethodSystem_CAPS_staticGetExtension(ModelElement, Guid)

System_CAPS_pubmethodSystem_CAPS_staticGetExtension(ModelElement, Type)

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.

System_CAPS_pubmethodSystem_CAPS_staticGetExtension<T>(ModelElement)

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.

System_CAPS_pubmethodSystem_CAPS_staticIsExtendedBy(ModelElement, DomainClassInfo)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticIsExtendedBy(ModelElement, Guid)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticIsExtendedBy(ModelElement, Type)

Query whether this ModelElement is currently extended by an ExtensionElement of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticRemoveExtension(ModelElement, DomainClassInfo)

Remove any extension of the specified ModelElement that is of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticRemoveExtension(ModelElement, ExtensionElement)

Remove a specified ExtensionElement from the extensions of this ModelElement.

System_CAPS_pubmethodSystem_CAPS_staticRemoveExtension(ModelElement, Guid)

Remove any extension of the specified ModelElement that is of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticRemoveExtension(ModelElement, Type)

Remove any extension of this ModelElement that is of a particular type.

System_CAPS_pubmethodSystem_CAPS_staticTryGetExtension(ModelElement, DomainClassInfo)

System_CAPS_pubmethodSystem_CAPS_staticTryGetExtension(ModelElement, Guid)

System_CAPS_pubmethodSystem_CAPS_staticTryGetExtension(ModelElement, Type)

System_CAPS_pubmethodSystem_CAPS_staticTryGetExtension<T>(ModelElement)

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.

For more information see Adding Extensions to DSL Definitions.

Import the namespace Microsoft.VisualStudio.Modeling.Extensibility to make these operations available as if methods of ModelElement. Otherwise the same operations are available as static methods on ModelElement.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: