C# Class Felinesoft.UmbracoCodeFirst.Attributes.DataTypeAttribute

Inheritance: CodeFirstAttribute, IInitialisableAttribute
Afficher le fichier Open project: DanMannMann/UmbracoCodeFirst

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Method Details

DataTypeAttribute() public méthode

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]
Résultat System

GetConverterType() protected méthode

Gets the converter type
protected GetConverterType ( ) : Type
Résultat Type

Initialise() public méthode

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
Résultat void

MakeAutoConverterType() protected méthode

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
Résultat Type