C# Class MicroLite.TypeConverters.TypeConverter

A class which allows access to ITypeConverters.
Show file Open project: TrevorPilley/MicroLite Class Usage Examples

Public Methods

Method Description
For ( Type type ) : ITypeConverter

Gets the ITypeConverter for the specified type.

If For returns null, the TypeConverter.Default can be used.

IsNotEntityAndConvertible ( Type type ) : bool

Determines whether the type is not an entity type and is a convertible type.

RegisterTypeMapping ( Type type, DbType dbType ) : void

Registers the type mapping between a Type and DbType.

ResolveActualType ( Type type ) : Type

Resolves the actual type.

ResolveDbType ( Type type ) : DbType

Resolves the DbType mapped to the Type.

Method Details

For() public static method

Gets the ITypeConverter for the specified type.
If For returns null, the TypeConverter.Default can be used.
public static For ( Type type ) : ITypeConverter
type System.Type The type to get the converter for.
return ITypeConverter

IsNotEntityAndConvertible() public static method

Determines whether the type is not an entity type and is a convertible type.
Thrown if type is null.
public static IsNotEntityAndConvertible ( Type type ) : bool
type System.Type The type to test.
return bool

RegisterTypeMapping() public static method

Registers the type mapping between a Type and DbType.
public static RegisterTypeMapping ( Type type, DbType dbType ) : void
type System.Type The Type to be mapped.
dbType DbType The DbType to be mapped to.
return void

ResolveActualType() public static method

Resolves the actual type.
Thrown if type is null.
public static ResolveActualType ( Type type ) : Type
type System.Type The type to resolve.
return System.Type

ResolveDbType() public static method

Resolves the DbType mapped to the Type.
Thrown if the Type is not mapped to a DbType.
public static ResolveDbType ( Type type ) : DbType
type System.Type The Type to resolve the DbType from.
return DbType