C# Class System.ComponentModel.ReferenceConverter

Inheritance: TypeConverter
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

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 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.

Méthodes protégées

Méthode 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 méthode

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
Résultat bool

ConvertFrom() public méthode

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
Résultat object

ConvertTo() public méthode

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
Résultat object

GetStandardValues() public méthode

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

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.

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

IsValueAllowed() protected méthode

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
Résultat bool

ReferenceConverter() public méthode

Initializes a new instance of the class.

public ReferenceConverter ( Type type ) : Microsoft.Win32
type System.Type
Résultat Microsoft.Win32