| DataType Class |
Namespace: CMS.DataEngine
public abstract class DataType
The DataType type exposes the following members.
| Name | Description | |
|---|---|---|
| mTextSerializer |
Serializer used to serialize and deserialize values of this data type.
|
| Name | Description | |
|---|---|---|
| AllowAsAliasSource |
Returns true if the field can be used as an alias source
| |
| AllowedObjectTypes |
When configured, only allows data type for the given object types.
Use case insensitive HashSet for the list of items
| |
| AllowEmpty |
If true, the data type allows for nulls in the database
| |
| CodeValueFormat |
Formatting code of the value for this type
| |
| ConversionMethod |
Returns the conversion method
| |
| DbType |
Database type
| |
| DefaultPrecision |
Default precision of the type, if the precision is variable
| |
| DefaultSize |
Default size of the type, if the size is variable
| |
| DefaultValueCode |
Code of the default value for this type
| |
| FieldType |
Field type
| |
| GetFormatProvider |
Function which gets a format provider for the given culture
| |
| HasConfigurableDefaultValue |
Returns true if the type has a default value
| |
| Hidden |
If true, the data type is hidden
| |
| IsDefaultType |
If true, the data type is considered default. Types marked as default are replaced only by default types in the type mapping tables.
| |
| MaxPrecision |
Maximum precision of the type, if the precision is variable
| |
| MaxSize |
Maximum size of the type, if the size is variable
| |
| MaxValueLength |
Maximum value length
| |
| ObjectDefaultValue |
Default value for this data type
| |
| SchemaType |
Type representation in the XML schema of the data
| |
| SpecialDefaultValues |
List of special default values recognized by this type and treated as default value by the code
| |
| SqlType |
SQL data type representation
| |
| SqlValueFormat |
SQL value format. Default format is '{0}' to prevent SQL injection
| |
| StringFormat |
If defined, the given format is used to convert the value of this type to a string value. {0} represents the value.
| |
| SupportsTranslation |
If true, the data type supports translation of the content
| |
| TextSerializer |
Gets the IDataTypeTextSerializer instance for this data type.
| |
| Type |
System type
| |
| TypeAlias |
System type alias (e.g. bool for Boolean, etc.)
| |
| TypeGroup |
Name of the group that groups together types with similar behavior, such as integer, decimal, string etc.
| |
| TypeName |
Represents database type name
| |
| VariablePrecision |
If true, the data type has variable precision
| |
| VariableSize |
If true, the data type has variable size
|
| Name | Description | |
|---|---|---|
| Convert |
Converts the value to a proper type
| |
| ConvertToDbType |
Converts the value to its database representation.
| |
| FormatValue |
Formats the given value
| |
| GetDefaultValueCode |
Gets the code for the default value of this type in C# code
| |
| GetSqlType |
Gets the SQL data type representation
| |
| GetSqlValue |
Gets the SQL value representation for this type
| |
| GetString |
Gets the string representation of the given value
| |
| IsAvailableForObjectType |
Returns true if the given data type is available for the given object type
| |
| IsValueOfType |
Determines whether given value is of this data type.
|