Search Results for

    Show / Hide Table of Contents
    View Source

    Class DataType

    Implements IDataType.

    Inheritance
    System.Object
    BeingDirtyBase
    EntityBase
    TreeEntityBase
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(IsReference = true)]
    public class DataType : TreeEntityBase, IDataType, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty

    Constructors

    View Source

    DataType(IDataEditor, IConfigurationEditorJsonSerializer, Int32)

    Initializes a new instance of the DataType class.

    Declaration
    public DataType(IDataEditor editor, IConfigurationEditorJsonSerializer serializer, int parentId = -1)
    Parameters
    Type Name Description
    IDataEditor editor
    IConfigurationEditorJsonSerializer serializer
    System.Int32 parentId

    Properties

    View Source

    ConfigurationData

    Gets or sets the configuration data.

    Declaration
    public IDictionary<string, object> ConfigurationData { get; set; }
    Property Value
    Type Description
    IDictionary<System.String, System.Object>
    View Source

    ConfigurationObject

    Gets an object representation of the configuration data.

    Declaration
    [DataMember]
    public object ConfigurationObject { get; }
    Property Value
    Type Description
    System.Object
    Remarks

    The object type is dictated by the underlying IConfigurationEditor implementation of the Editor.

    View Source

    DatabaseType

    Gets or sets the database type for the data type values.

    Declaration
    [DataMember]
    public ValueStorageType DatabaseType { get; set; }
    Property Value
    Type Description
    ValueStorageType
    Remarks

    In most cases this is imposed by the property editor, but some editors may support storing different types.

    View Source

    Editor

    Gets or sets the property editor.

    Declaration
    [IgnoreDataMember]
    public IDataEditor Editor { get; set; }
    Property Value
    Type Description
    IDataEditor
    View Source

    EditorAlias

    Gets the property editor alias.

    Declaration
    [DataMember]
    public string EditorAlias { get; }
    Property Value
    Type Description
    System.String
    View Source

    EditorUiAlias

    Gets the property editor UI alias.

    Declaration
    [DataMember]
    public string EditorUiAlias { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    View Source

    SetConfigurationData(IDictionary<String, Object>)

    Sets the configuration without invoking property changed events.

    Declaration
    public void SetConfigurationData(IDictionary<string, object> configurationData)
    Parameters
    Type Name Description
    IDictionary<System.String, System.Object> configurationData
    Remarks

    This method is meant to be used when building entities from database, exclusively. It does NOT register a property change to dirty. It ignores the fact that the configuration may contain the database type, because the datatype DTO should also contain that database type, and they should be the same.

    Think before using!

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • DataType(IDataEditor, IConfigurationEditorJsonSerializer, Int32)
    • Properties
      • ConfigurationData
      • ConfigurationObject
      • DatabaseType
      • Editor
      • EditorAlias
      • EditorUiAlias
    • Methods
      • SetConfigurationData(IDictionary<String, Object>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX