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