Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyTypeExtensions

    Provides extension methods for IPropertyType.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class PropertyTypeExtensions

    Methods

    View Source

    GetDataType(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 null if the id-to-key lookup fails or the data type cannot be loaded.

    Remarks

    Prefers DataTypeKey directly when set; falls back to mapping the int DataTypeId via IIdKeyMap.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX