Click or drag to resize
DataType Class
Data type definition
Inheritance Hierarchy

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 12.0.0
Syntax
C#
public abstract class DataType

The DataType type exposes the following members.

Constructors
  NameDescription
Protected methodDataType
Top
Fields
  NameDescription
Protected fieldmTextSerializer
Serializer used to serialize and deserialize values of this data type.
Top
Properties
  NameDescription
Public propertyAllowAsAliasSource
Returns true if the field can be used as an alias source
Public propertyAllowedObjectTypes
When configured, only allows data type for the given object types. Use case insensitive HashSet for the list of items
Public propertyAllowEmpty
If true, the data type allows for nulls in the database
Public propertyCodeValueFormat
Formatting code of the value for this type
Public propertyConversionMethod
Returns the conversion method
Public propertyDbType
Database type
Public propertyDefaultPrecision
Default precision of the type, if the precision is variable
Public propertyDefaultSize
Default size of the type, if the size is variable
Public propertyDefaultValueCode
Code of the default value for this type
Public propertyFieldType
Field type
Public propertyGetFormatProvider
Function which gets a format provider for the given culture
Public propertyHasConfigurableDefaultValue
Returns true if the type has a default value
Public propertyHidden
If true, the data type is hidden
Public propertyIsDefaultType
If true, the data type is considered default. Types marked as default are replaced only by default types in the type mapping tables.
Public propertyMaxPrecision
Maximum precision of the type, if the precision is variable
Public propertyMaxSize
Maximum size of the type, if the size is variable
Public propertyMaxValueLength
Maximum value length
Public propertyObjectDefaultValue
Default value for this data type
Public propertySchemaType
Type representation in the XML schema of the data
Public propertySpecialDefaultValues
List of special default values recognized by this type and treated as default value by the code
Public propertySqlType
SQL data type representation
Public propertySqlValueFormat
SQL value format. Default format is '{0}' to prevent SQL injection
Public propertyStringFormat
If defined, the given format is used to convert the value of this type to a string value. {0} represents the value.
Public propertySupportsTranslation
If true, the data type supports translation of the content
Public propertyTextSerializer
Gets the IDataTypeTextSerializer instance for this data type.
Public propertyType
System type
Public propertyTypeAlias
System type alias (e.g. bool for Boolean, etc.)
Public propertyTypeGroup
Name of the group that groups together types with similar behavior, such as integer, decimal, string etc.
Public propertyTypeName
Represents database type name
Public propertyVariablePrecision
If true, the data type has variable precision
Public propertyVariableSize
If true, the data type has variable size
Top
Methods
  NameDescription
Public methodConvert
Converts the value to a proper type
Public methodConvertToDbType
Converts the value to its database representation.
Protected methodFormatValue
Formats the given value
Public methodGetDefaultValueCode
Gets the code for the default value of this type in C# code
Public methodGetSqlType
Gets the SQL data type representation
Public methodGetSqlValue
Gets the SQL value representation for this type
Public methodGetString
Gets the string representation of the given value
Public methodIsAvailableForObjectType
Returns true if the given data type is available for the given object type
Public methodIsValueOfType
Determines whether given value is of this data type.
Top
See Also