Class DataTypeExtensions
Provides extensions methods for IDataType.
Inheritance
System.Object
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public static class DataTypeExtensions
Methods
View SourceConfigurationAs<T>(IDataType)
Gets the configuration object.
Declaration
public static T ConfigurationAs<T>(this IDataType dataType)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IDataType | dataType | This datatype. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The expected type of the configuration object. |
Exceptions
Type | Condition |
---|---|
System.InvalidCastException | When the datatype configuration is not of the expected type. |