Open sandboxFocus

Method GetExtension

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, IMetaExtension
Returns
Type Description
T

The object of type T.

Type Parameters
Name Description
T

The type of the object.

Exceptions
Type Condition
InvalidOperationException

The current template has no object of type T.

See Also