GetExtension<T>()
Gets the object of a given type that a Metalama extension makes available to the current template.
Declaration
public static T GetExtension<T>() where T : class, IMetaExtensionReturns
| Type | Description |
|---|---|
| T | The object of type |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The current template has no object of type |
See Also
TryGetExtension<T>(out T)