C# Класс Felinesoft.UmbracoCodeFirst.Attributes.DataTypeAttribute

Наследование: CodeFirstAttribute, IInitialisableAttribute
Показать файл Открыть проект

Открытые методы

Метод Описание
DataTypeAttribute ( string propertyEditorAlias = null, string name = null, Type converterType = null, DatabaseType dbType = DatabaseType.None, bool useConverter = true ) : System

Specifies that the decorated type is a code-first data type

Initialise ( Type targetType ) : void

Initialises the Factory property based on the type to which the attribute is applied.

Защищенные методы

Метод Описание
GetConverterType ( ) : Type

Gets the converter type

MakeAutoConverterType ( Type targetType, DatabaseType &storageType ) : Type

Composes a generic converter which can convert the IUmbracoDataType to which this attribute is applied

Описание методов

DataTypeAttribute() публичный Метод

Specifies that the decorated type is a code-first data type
public DataTypeAttribute ( string propertyEditorAlias = null, string name = null, Type converterType = null, DatabaseType dbType = DatabaseType.None, bool useConverter = true ) : System
propertyEditorAlias string The property editor alias for the data type
name string The instance name for the data type
converterType System.Type The default converter type which can convert between the code-first class and an Umbraco property of that data type
dbType DatabaseType The storage type used to store the data type value in the database
useConverter bool False to use no converter if converterType is null, true to attempt to use an automatic converter. /// Using an automatic converter requires the data type class to implement IUmbracoDataType[`Tdb]
Результат System

GetConverterType() защищенный Метод

Gets the converter type
protected GetConverterType ( ) : Type
Результат Type

Initialise() публичный Метод

Initialises the Factory property based on the type to which the attribute is applied.
public Initialise ( Type targetType ) : void
targetType Type The type to which the attribute is applied
Результат void

MakeAutoConverterType() защищенный Метод

Composes a generic converter which can convert the IUmbracoDataType to which this attribute is applied
protected MakeAutoConverterType ( Type targetType, DatabaseType &storageType ) : Type
targetType Type
storageType DatabaseType
Результат Type