Class PropertyTypeExtensions
Provides extension methods for IPropertyType.
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class PropertyTypeExtensions
Methods
View SourceGetDataType(IPropertyType, IDataTypeService, IIdKeyMap)
Resolves the data type referenced by the given property type.
Declaration
public static IDataType? GetDataType(this IPropertyType propertyType, IDataTypeService dataTypeService, IIdKeyMap idKeyMap)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyType | propertyType | The property type. |
| IDataTypeService | dataTypeService | The data type service. |
| IIdKeyMap | idKeyMap | The cached id-to-key map used to resolve int data type IDs to GUID keys. |
Returns
| Type | Description |
|---|---|
| IDataType | The resolved IDataType, or |
Remarks
Prefers DataTypeKey directly when set; falls back to mapping the int DataTypeId via IIdKeyMap.