Class DataType
Implements IDataType.
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class DataType : TreeEntityBase, IDataType, IUmbracoEntity, ITreeEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
View SourceDataType(IDataEditor, Int32)
Initializes a new instance of the DataType class.
Declaration
public DataType(IDataEditor editor, int parentId = -1)
Parameters
Type | Name | Description |
---|---|---|
IDataEditor | editor | |
System.Int32 | parentId |
Properties
View SourceConfiguration
Gets or sets the configuration object.
Declaration
[DataMember]
public object Configuration { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Remarks
The configuration object is serialized to Json and stored into the database.
The serialized Json is deserialized by the property editor, which by default should return a Dictionary{string, object} but could return a typed object e.g. MyEditor.Configuration.
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.
Editor
Gets or sets the property editor.
Declaration
[IgnoreDataMember]
public IDataEditor Editor { get; set; }
Property Value
Type | Description |
---|---|
IDataEditor |
EditorAlias
Gets the property editor alias.
Declaration
[DataMember]
public string EditorAlias { get; }
Property Value
Type | Description |
---|---|
System.String |