ModelElement::AddExtension<T> Method (ModelElement^)
Visual Studio 2015
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.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)
public: generic<typename T> where T : ExtensionElement static T AddExtension( ModelElement^ element )
Parameters
- element
-
Type:
Microsoft.VisualStudio.Modeling::ModelElement^
ModelElement to be extended
Return Value
Type: TType Parameters
- T
The type of ExtensionElement to be added
Show: