Contact us

Applies to: Customer's Canvas On-Premises; Design Atoms .NET 7.4

Skip to main content

Class UnitConverter

Namespace: Aurigma.DesignAtoms.Convert.Unit

Assembly: Aurigma.DesignAtoms.dll

Syntax
public class UnitConverter : TypeConverter

Inheritance: System.Object -> UnitConverter

Constructors​

UnitConverter​

public UnitConverter()

Methods​

CanConvertFrom​

public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)

Parameters​

TypeNameDescription
System.ComponentModel.ITypeDescriptorContextcontext
System.TypesourceType

Returns​

System.Boolean

CanConvertTo​

public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)

Parameters​

TypeNameDescription
System.ComponentModel.ITypeDescriptorContextcontext
System.TypedestinationType

Returns​

System.Boolean

ConvertFrom​

public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)

Parameters​

TypeNameDescription
System.ComponentModel.ITypeDescriptorContextcontext
System.Globalization.CultureInfoculture
System.Objectvalue

Returns​

System.Object

ConvertTo​

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

Parameters​

TypeNameDescription
System.ComponentModel.ITypeDescriptorContextcontext
System.Globalization.CultureInfoculture
System.Objectvalue
System.TypedestinationType

Returns​

System.Object

Was this page helpful?