C# Class System.ComponentModel.TypeConverter

显示文件 Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
CanConvertFrom ( Type sourceType ) : bool
CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
CanConvertTo ( Type destinationType ) : bool
ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
ConvertFrom ( object value ) : object
ConvertFromInvariantString ( ITypeDescriptorContext context, string text ) : object
ConvertFromString ( ITypeDescriptorContext context, CultureInfo culture, string text ) : object
ConvertFromString ( ITypeDescriptorContext context, string text ) : object
ConvertFromString ( string text ) : object
ConvertTo ( object value, Type destinationType ) : object
ConvertToInvariantString ( ITypeDescriptorContext context, object value ) : string
ConvertToInvariantString ( object value ) : string
ConvertToString ( ITypeDescriptorContext context, CultureInfo culture, object value ) : string
ConvertToString ( ITypeDescriptorContext context, object value ) : string
CreateInstance ( IDictionary propertyValues ) : object
CreateInstance ( ITypeDescriptorContext context, IDictionary propertyValues ) : object
GetCreateInstanceSupported ( ) : bool
GetCreateInstanceSupported ( ITypeDescriptorContext context ) : bool
GetProperties ( ITypeDescriptorContext context, object value ) : PropertyDescriptorCollection
GetProperties ( ITypeDescriptorContext context, object value, Attribute attributes ) : PropertyDescriptorCollection
GetProperties ( object value ) : PropertyDescriptorCollection
GetPropertiesSupported ( ) : bool
GetPropertiesSupported ( ITypeDescriptorContext context ) : bool
GetStandardValues ( ) : ICollection
GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
GetStandardValuesExclusive ( ) : bool
GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool
GetStandardValuesSupported ( ) : bool
GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
IsValid ( ITypeDescriptorContext context, object value ) : bool
IsValid ( object value ) : bool

Protected Methods

Method Description
GetConvertFromException ( object value ) : Exception
GetConvertToException ( object value, Type destinationType ) : Exception
SortProperties ( PropertyDescriptorCollection props, string names ) : PropertyDescriptorCollection

Private Methods

Method Description
ConvertFromInvariantString ( string text ) : object
ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
ConvertToString ( object value ) : string

Method Details

CanConvertFrom() public method

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

CanConvertFrom() public method

public CanConvertFrom ( Type sourceType ) : bool
sourceType Type
return bool

CanConvertTo() public method

public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType Type
return bool

CanConvertTo() public method

public CanConvertTo ( Type destinationType ) : bool
destinationType Type
return bool

ConvertFrom() public method

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

ConvertFrom() public method

public ConvertFrom ( object value ) : object
value object
return object

ConvertFromInvariantString() public method

public ConvertFromInvariantString ( ITypeDescriptorContext context, string text ) : object
context ITypeDescriptorContext
text string
return object

ConvertFromString() public method

public ConvertFromString ( ITypeDescriptorContext context, CultureInfo culture, string text ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
text string
return object

ConvertFromString() public method

public ConvertFromString ( ITypeDescriptorContext context, string text ) : object
context ITypeDescriptorContext
text string
return object

ConvertFromString() public method

public ConvertFromString ( string text ) : object
text string
return object

ConvertTo() public method

public ConvertTo ( object value, Type destinationType ) : object
value object
destinationType Type
return object

ConvertToInvariantString() public method

public ConvertToInvariantString ( ITypeDescriptorContext context, object value ) : string
context ITypeDescriptorContext
value object
return string

ConvertToInvariantString() public method

public ConvertToInvariantString ( object value ) : string
value object
return string

ConvertToString() public method

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

ConvertToString() public method

public ConvertToString ( ITypeDescriptorContext context, object value ) : string
context ITypeDescriptorContext
value object
return string

CreateInstance() public method

public CreateInstance ( IDictionary propertyValues ) : object
propertyValues IDictionary
return object

CreateInstance() public method

public CreateInstance ( ITypeDescriptorContext context, IDictionary propertyValues ) : object
context ITypeDescriptorContext
propertyValues IDictionary
return object

GetConvertFromException() protected method

protected GetConvertFromException ( object value ) : Exception
value object
return Exception

GetConvertToException() protected method

protected GetConvertToException ( object value, Type destinationType ) : Exception
value object
destinationType Type
return Exception

GetCreateInstanceSupported() public method

public GetCreateInstanceSupported ( ) : bool
return bool

GetCreateInstanceSupported() public method

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

GetProperties() public method

public GetProperties ( ITypeDescriptorContext context, object value ) : PropertyDescriptorCollection
context ITypeDescriptorContext
value object
return PropertyDescriptorCollection

GetProperties() public method

public GetProperties ( ITypeDescriptorContext context, object value, Attribute attributes ) : PropertyDescriptorCollection
context ITypeDescriptorContext
value object
attributes Attribute
return PropertyDescriptorCollection

GetProperties() public method

public GetProperties ( object value ) : PropertyDescriptorCollection
value object
return PropertyDescriptorCollection

GetPropertiesSupported() public method

public GetPropertiesSupported ( ) : bool
return bool

GetPropertiesSupported() public method

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

GetStandardValues() public method

public GetStandardValues ( ) : ICollection
return ICollection

GetStandardValues() public method

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

GetStandardValuesExclusive() public method

public GetStandardValuesExclusive ( ) : bool
return bool

GetStandardValuesExclusive() public method

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

GetStandardValuesSupported() public method

public GetStandardValuesSupported ( ) : bool
return bool

GetStandardValuesSupported() public method

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

IsValid() public method

public IsValid ( ITypeDescriptorContext context, object value ) : bool
context ITypeDescriptorContext
value object
return bool

IsValid() public method

public IsValid ( object value ) : bool
value object
return bool

SortProperties() protected method

protected SortProperties ( PropertyDescriptorCollection props, string names ) : PropertyDescriptorCollection
props PropertyDescriptorCollection
names string
return PropertyDescriptorCollection