C# Class Microsoft.VisualStudio.R.Package.Options.R.Tools.EncodingTypeConverter

Inheritance: System.ComponentModel.TypeConverter
Exibir arquivo Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object

Converts encoding name to code page

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

Converts code page number to the user-friendly encoding name

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool

Private Methods

Method Description
ConvertToCodePage ( string encodingName ) : int
ConvertToEncodingName ( int codePage ) : string

Method Details

CanConvertFrom() public method

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

CanConvertTo() public method

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

ConvertFrom() public method

Converts encoding name to code page
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
return object

ConvertTo() public method

Converts code page number to the user-friendly encoding name
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

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

GetStandardValuesSupported() public method

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