C# Class Qowaiv.Conversion.PercentageTypeConverter

Provides a conversion for a Percentage.
Inheritance: System.ComponentModel.TypeConverter
ファイルを表示 Open project: Corniel/Qowaiv

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Returns whether this converter can convert an string to a Percentage, using the specified context.

ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object

Converts a string to a Percentage, using the specified context and culture information.

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

Converts a Percentage to string, using the specified context and culture information.

Method Details

CanConvertFrom() public method

Returns whether this converter can convert an string to a Percentage, using the specified context.
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext /// An System.ComponentModel.ITypeDescriptorContext that provides a format context. ///
sourceType System.Type /// A System.Type that represents the type you want to convert from. ///
return bool

ConvertFrom() public method

Converts a string to a Percentage, using the specified context and culture information.
/// The conversion cannot be performed. ///
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext /// An System.ComponentModel.ITypeDescriptorContext that provides a format context. ///
culture System.Globalization.CultureInfo /// The System.Globalization.CultureInfo to use as the current culture. ///
value object /// The System.Object to convert. ///
return object

ConvertTo() public method

Converts a Percentage to string, using the specified context and culture information.
/// The destinationType parameter is null. /// /// The conversion cannot be performed. ///
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext /// An System.ComponentModel.ITypeDescriptorContext that provides a format context. ///
culture System.Globalization.CultureInfo /// A System.Globalization.CultureInfo. If null is passed, the current culture is assumed. ///
value object /// The Percentage to convert. ///
destinationType System.Type /// The System.Type to convert the value parameter to. ///
return object