ModelElement.GetExtension<T> Method (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.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'Declaración
Public Shared Function GetExtension(Of T As ExtensionElement) ( _
element As ModelElement _
) As T
public static T GetExtension<T>(
ModelElement element
)
where T : ExtensionElement
public:
generic<typename T>
where T : ExtensionElement
static T GetExtension(
ModelElement^ element
)
static member GetExtension :
element:ModelElement -> 'T when 'T : ExtensionElement
JScript does not support generic types or methods.
Type Parameters
- T
The type of ExtensionElement to retrieve
Parameters
- element
Type: Microsoft.VisualStudio.Modeling.ModelElement
The extended ModelElement
Return Value
Type: T
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.