C# 클래스 Felinesoft.UmbracoCodeFirst.Attributes.DataTypeAttribute

상속: CodeFirstAttribute, IInitialisableAttribute
파일 보기 프로젝트 열기: DanMannMann/UmbracoCodeFirst

공개 메소드들

메소드 설명
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