C# Class System.ComponentModel.TypeListConverter

Provides a type converter that can be used to populate a list box with available types.

Inheritance: TypeConverter
Afficher le fichier Open project: dotnet/corefx

Méthodes publiques

Méthode Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

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

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Gets a value indicating whether this converter can convert an object to the given destination type using the context.

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

Converts the specified value object to an enumeration object.

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

Converts the given value object to the specified destination type.

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

Gets a collection of standard values for the data type this validator is designed for.

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 using the specified context.

Méthodes protégées

Méthode Description
TypeListConverter ( Type types ) : System.ComponentModel.Design.Serialization

Initializes a new instance of the class using the type array as the available types.

Method Details

CanConvertFrom() public méthode

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

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType Type
Résultat bool

CanConvertTo() public méthode

Gets a value indicating whether this converter can convert an object to the given destination type using the context.

public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType Type
Résultat bool

ConvertFrom() public méthode

Converts the specified value object to an enumeration object.

public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
Résultat object

ConvertTo() public méthode

Converts the given value object to the specified destination type.

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

GetStandardValues() public méthode

Gets a collection of standard values for the data type this validator is designed for.

public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
Résultat StandardValuesCollection

GetStandardValuesExclusive() public méthode

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

public GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
Résultat bool

GetStandardValuesSupported() public méthode

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

public GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
Résultat bool

TypeListConverter() protected méthode

Initializes a new instance of the class using the type array as the available types.

protected TypeListConverter ( Type types ) : System.ComponentModel.Design.Serialization
types Type
Résultat System.ComponentModel.Design.Serialization