C# 클래스 MicroLite.TypeConverters.EnumTypeConverter

An ITypeConverter which can convert Enum values to and from database values.
It ensures that the database value is converted to and from the underlying storage type of the Enum to allow for db columns being byte, short, integer or long.
상속: ITypeConverter
파일 보기 프로젝트 열기: TrevorPilley/MicroLite 1 사용 예제들

공개 메소드들

메소드 설명
CanConvert ( Type type ) : bool

Determines whether this type converter can convert values for the specified type.

ConvertFromDbValue ( IDataReader reader, int index, Type type ) : object

Converts value at the specified index in the IDataReader into an instance of the specified type.

ConvertFromDbValue ( object value, Type type ) : object

Converts the specified database value into an instance of the specified type.

ConvertToDbValue ( object value, Type type ) : object

Converts the specified value into an instance of the database value.

메소드 상세

CanConvert() 공개 메소드

Determines whether this type converter can convert values for the specified type.
public CanConvert ( Type type ) : bool
type System.Type The type to check.
리턴 bool

ConvertFromDbValue() 공개 메소드

Converts value at the specified index in the IDataReader into an instance of the specified type.
public ConvertFromDbValue ( IDataReader reader, int index, Type type ) : object
reader IDataReader The IDataReader containing the results.
index int The index of the record to read from the IDataReader.
type System.Type The type to convert result value to.
리턴 object

ConvertFromDbValue() 공개 메소드

Converts the specified database value into an instance of the specified type.
public ConvertFromDbValue ( object value, Type type ) : object
value object The database value to be converted.
type System.Type The type to convert to.
리턴 object

ConvertToDbValue() 공개 메소드

Converts the specified value into an instance of the database value.
public ConvertToDbValue ( object value, Type type ) : object
value object The value to be converted.
type System.Type The type to convert from.
리턴 object