ModelElementExtensionMethods::AddExtension Method (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.

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

public:
[ExtensionAttribute]
static ExtensionElement^ AddExtension(
	ModelElement^ element,
	ExtensionElement^ extension
)

Parameters

element
Type: Microsoft.VisualStudio.Modeling::ModelElement^

ModelElement to be extended

extension
Type: Microsoft.VisualStudio.Modeling::ExtensionElement^

The ExtensionElement to be added

Return Value

Type: Microsoft.VisualStudio.Modeling::ExtensionElement^

The added extension

Return to top
Show: