C# Class System.ComponentModel.ReferenceConverter

Inheritance: TypeConverter
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

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

Gets a value indicating whether this converter can convert an object in the given source type to a reference object using the specified context.

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

Converts the given object to the reference type.

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

Converts the given value object to the reference type using the specified context and arguments.

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

Gets a collection of standard values for the reference data type.

GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool

Gets a value indicating whether the list of standard values returned from is an exclusive list.

GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool

Gets a value indicating whether this object supports a standard set of values that can be picked from a list.

ReferenceConverter ( Type type ) : Microsoft.Win32

Initializes a new instance of the class.

Protected Methods

Method Description
IsValueAllowed ( ITypeDescriptorContext context, object value ) : bool

Gets a value indicating whether a particular value can be added to the standard values collection.

Method Details

CanConvertFrom() public method

Gets a value indicating whether this converter can convert an object in the given source type to a reference object using the specified context.

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool

ConvertFrom() public method

Converts the given object to the reference type.

public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
return object

ConvertTo() public method

Converts the given value object to the reference type using the specified context and arguments.

public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
destinationType System.Type
return object

GetStandardValues() public method

Gets a collection of standard values for the reference data type.

public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
return StandardValuesCollection

GetStandardValuesExclusive() public method

Gets a value indicating whether the list of standard values returned from is an exclusive list.

public GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

GetStandardValuesSupported() public method

Gets a value indicating whether this object supports a standard set of values that can be picked from a list.

public GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

IsValueAllowed() protected method

Gets a value indicating whether a particular value can be added to the standard values collection.

protected IsValueAllowed ( ITypeDescriptorContext context, object value ) : bool
context ITypeDescriptorContext
value object
return bool

ReferenceConverter() public method

Initializes a new instance of the class.

public ReferenceConverter ( Type type ) : Microsoft.Win32
type System.Type
return Microsoft.Win32