Search Results for

    Show / Hide Table of Contents
    View Source

    Class MustBeStringValueConverter

    Ensures that no matter what is selected in (editor), the value results in a string.

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

    For more details see issues http://issues.umbraco.org/issue/U4-3776 (MNTP) and http://issues.umbraco.org/issue/U4-4160 (media picker).

    The cache level is set to .Content because the string is supposed to depend on the source value only, and not on any other content. It is NOT appropriate to use that converter for values whose .ToString() would depend on other content.

    Methods

    View Source

    ConvertSourceToIntermediate(IPublishedElement, IPublishedPropertyType, Object, Boolean)

    Declaration
    public override object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)
    Parameters
    Type Name Description
    IPublishedElement owner
    IPublishedPropertyType propertyType
    System.Object source
    System.Boolean preview
    Returns
    Type Description
    System.Object
    View Source

    GetPropertyCacheLevel(IPublishedPropertyType)

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

    GetPropertyValueType(IPublishedPropertyType)

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

    IsConverter(IPublishedPropertyType)

    Declaration
    public override bool IsConverter(IPublishedPropertyType propertyType)
    Parameters
    Type Name Description
    IPublishedPropertyType propertyType
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • ConvertSourceToIntermediate(IPublishedElement, IPublishedPropertyType, Object, Boolean)
      • GetPropertyCacheLevel(IPublishedPropertyType)
      • GetPropertyValueType(IPublishedPropertyType)
      • IsConverter(IPublishedPropertyType)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX