C# Класс MicroLite.TypeConverters.ObjectTypeConverter

An ITypeConverter which uses Convert.ChangeType.
It is the default ITypeConverter, which can be used if no suitable specific implementation exists.
Наследование: ITypeConverter
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.
thrown if propertyType is null.
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