C# Class PetShop.Business.GenericTypeConverter

Provides a unified way of converting types of values to other types, as well as for accessing standard values and subproperties. Used by the nettiers strongly typed collection, so they can be saved in ViewState.
Inheritance: System.ComponentModel.TypeConverter
Datei anzeigen Open project: netTiers/netTiers

Public Methods

Method Description
CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Returns whether this converter can convert the object to the specified type.

ConvertTo ( ITypeDescriptorContext context, System culture, object val, Type destinationType ) : object

Converts the given value object to the specified type.

GenericTypeConverter ( ) : System

Initializes a new instance of the GenericTypeConverter class.

Method Details

CanConvertTo() public method

Returns whether this converter can convert the object to the specified type.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType System.Type
return bool

ConvertTo() public method

Converts the given value object to the specified type.
public ConvertTo ( ITypeDescriptorContext context, System culture, object val, Type destinationType ) : object
context ITypeDescriptorContext
culture System
val object
destinationType System.Type
return object

GenericTypeConverter() public method

Initializes a new instance of the GenericTypeConverter class.
public GenericTypeConverter ( ) : System
return System