Class Duration.DurationConverter
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
public class Duration.DurationConverter : TypeConverter
- Inheritance
-
Duration.DurationConverter
- Inherited Members
Constructors
DurationConverter()
public DurationConverter()
Fields
CustomStandardValues
A collection of standard and custom Duration values.
public static readonly TypeConverter.StandardValuesCollection CustomStandardValues
Field Value
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Returns true for string type.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
sourceTypeTypeA Type that represents the type you want to convert from.
Returns
- bool
trueif this converter can perform the conversion; otherwise,false.
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
cultureCultureInfoThe CultureInfo to use as the current culture.
valueobjectThe object to convert.
Returns
Exceptions
- NotSupportedException
The conversion cannot be performed.
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the given value object to the specified type, using the specified context and culture information.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
cultureCultureInfoA CultureInfo. If null is passed, the current culture is assumed.
valueobjectThe object to convert.
destinationTypeTypeThe Type to convert the
valueparameter to.
Returns
Exceptions
- ArgumentNullException
The
destinationTypeparameter is null.- NotSupportedException
The conversion cannot be performed.
GetStandardValues(ITypeDescriptorContext)
Gets standard Duration values.
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
Returns
- TypeConverter.StandardValuesCollection
A set of default Duration values.
GetStandardValuesSupported(ITypeDescriptorContext)
Returns true.
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
Returns
- bool
true.