Table of Contents

Class NullableBoolTypeConverter

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

Converts from nullable bool to string and vice versa.

public class NullableBoolTypeConverter : NullableConverter
Inheritance
NullableBoolTypeConverter
Inherited Members

Constructors

NullableBoolTypeConverter()

Initializes a new instance of the Ranorex.Core.NullableBoolTypeConverter class.

public NullableBoolTypeConverter()

Methods

ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Creates a nullable bool instance from a string.

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

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture CultureInfo

The CultureInfo to use as the current culture.

value object

The object to convert.

Returns

object

A nullable bool that represents the converted value.

Exceptions

NotSupportedException

The conversion cannot be performed.

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Converts a nullable bool to a string.

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

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture CultureInfo

The CultureInfo to use as the current culture.

value object

The object to convert.

destinationType Type

The Type to convert the value parameter to.

Returns

object

A string representation of the nullable bool if destinationType is type string; otherwise the value returned by the base method.

GetStandardValues(ITypeDescriptorContext)

Gets standard values for the nullable bool type.

public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)

Parameters

context ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

Returns

TypeConverter.StandardValuesCollection

A set of default values for the nullable bool type.