C# Class MicroLite.TypeConverters.TypeConverter

A class which allows access to ITypeConverters.
Afficher le fichier Open project: TrevorPilley/MicroLite Class Usage Examples

Méthodes publiques

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

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.
Résultat ITypeConverter

IsNotEntityAndConvertible() public static méthode

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.
Résultat bool

RegisterTypeMapping() public static méthode

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

ResolveActualType() public static méthode

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

ResolveDbType() public static méthode

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.
Résultat DbType