C# Class ComponentFactory.Krypton.Toolkit.StringLookupConverter

Helper base class used to convert from to/from a table of value,string pairs.
Inheritance: System.ComponentModel.EnumConverter
Mostra file Open project: Cocotteseb/Krypton

Public Methods

Method Description
ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object

Converts the given object to the type of this converter, using the specified context and culture information.

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

Converts the given value object to the specified type, using the specified context and culture information.

StringLookupConverter ( Type enumType ) : System

Initialize a new instance of the StringLookupConverter clas.

Method Details

ConvertFrom() public method

Converts the given object to the type of this converter, using the specified context and culture information.
public ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object
context ITypeDescriptorContext An ITypeDescriptorContext that provides a format context.
culture System The CultureInfo to use as the current culture.
value object The Object to convert.
return object

ConvertTo() public method

Converts the given value object to the specified type, using the specified context and culture information.
public ConvertTo ( ITypeDescriptorContext context, System culture, object value, Type destinationType ) : object
context ITypeDescriptorContext An ITypeDescriptorContext that provides a format context.
culture System A CultureInfo object. If a null reference the current culture is assumed.
value object The Object to convert.
destinationType System.Type The Type to convert the value parameter to.
return object

StringLookupConverter() public method

Initialize a new instance of the StringLookupConverter clas.
public StringLookupConverter ( Type enumType ) : System
enumType System.Type
return System