Search Results for

    Show / Hide Table of Contents
    View Source

    Class SliderValueConverter

    The slider property value converter.

    Inheritance
    System.Object
    PropertyValueConverterBase
    Namespace: Umbraco.Cms.Core.PropertyEditors.ValueConverters
    Assembly: Umbraco.Core.dll
    Syntax
    public class SliderValueConverter : PropertyValueConverterBase, IPropertyValueConverter, IDiscoverable

    Constructors

    View Source

    SliderValueConverter()

    Initializes a new instance of the SliderValueConverter class.

    Declaration
    public SliderValueConverter()
    View Source

    SliderValueConverter(IDataTypeService)

    Initializes a new instance of the SliderValueConverter class.

    Declaration
    public SliderValueConverter(IDataTypeService dataTypeService)
    Parameters
    Type Name Description
    IDataTypeService dataTypeService

    The data type service.

    Methods

    View Source

    ClearCaches()

    Clears the data type configuration caches.

    Declaration
    public static void ClearCaches()
    View Source

    ConvertIntermediateToObject(IPublishedElement, IPublishedPropertyType, PropertyCacheLevel, Object, Boolean)

    Converts a property intermediate value to an Object value.

    Declaration
    public override object ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel cacheLevel, object source, bool preview)
    Parameters
    Type Name Description
    IPublishedElement owner

    The property set owning the property.

    IPublishedPropertyType propertyType

    The property type.

    PropertyCacheLevel cacheLevel
    System.Object source
    System.Boolean preview

    A value indicating whether conversion should take place in preview mode.

    Returns
    Type Description
    System.Object

    The result of the conversion.

    Remarks

    The converter should know how to convert a null intermediate value, or any intermediate value indicating that no value has been assigned to the property. It is up to the converter to determine what to return in that case: either null, or the default value...

    The referenceCacheLevel is passed to the converter so that it can be, in turn, passed to eg a PublishedFragment constructor. It is used by the fragment and the properties to manage the cache levels of property values. It is not meant to be used by the converter.

    View Source

    GetPropertyCacheLevel(IPublishedPropertyType)

    Gets the property cache level.

    Declaration
    public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
    Parameters
    Type Name Description
    IPublishedPropertyType propertyType

    The property type.

    Returns
    Type Description
    PropertyCacheLevel

    The property cache level.

    View Source

    GetPropertyValueType(IPublishedPropertyType)

    Gets the type of values returned by the converter.

    Declaration
    public override Type GetPropertyValueType(IPublishedPropertyType propertyType)
    Parameters
    Type Name Description
    IPublishedPropertyType propertyType

    The property type.

    Returns
    Type Description
    Type

    The CLR type of values returned by the converter.

    Remarks

    Some of the CLR types may be generated, therefore this method cannot directly return a Type object (which may not exist yet). In which case it needs to return a ModelType instance.

    View Source

    IsConverter(IPublishedPropertyType)

    Gets a value indicating whether the converter supports a property type.

    Declaration
    public override bool IsConverter(IPublishedPropertyType propertyType)
    Parameters
    Type Name Description
    IPublishedPropertyType propertyType

    The property type.

    Returns
    Type Description
    System.Boolean

    A value indicating whether the converter supports a property type.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • SliderValueConverter()
      • SliderValueConverter(IDataTypeService)
    • Methods
      • ClearCaches()
      • ConvertIntermediateToObject(IPublishedElement, IPublishedPropertyType, PropertyCacheLevel, Object, Boolean)
      • GetPropertyCacheLevel(IPublishedPropertyType)
      • GetPropertyValueType(IPublishedPropertyType)
      • IsConverter(IPublishedPropertyType)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX