C# Класс Spring.Core.TypeConversion.RuntimeTypeConverter

A custom System.ComponentModel.TypeConverter for runtime type references.

Currently only supports conversion to and from a System.String.

Наследование: System.ComponentModel.TypeConverter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Returns whether this converter can convert an object of one System.Type to the System.Type of this converter.

Currently only supports conversion from a System.String instance.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Returns whether this converter can convert the object to the specified System.Type.

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

Converts the given value to the type of this converter.

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

Converts the given value object to the specified type, using the specified context and culture information.

RuntimeTypeConverter ( ) : System

Creates a new instance of the Spring.Core.TypeConversion.RuntimeTypeConverter class.

Описание методов

CanConvertFrom() публичный Метод

Returns whether this converter can convert an object of one System.Type to the System.Type of this converter.

Currently only supports conversion from a System.String instance.

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext /// A /// that provides a format context. ///
sourceType System.Type /// A that represents the /// you want to convert from. ///
Результат bool

CanConvertTo() публичный Метод

Returns whether this converter can convert the object to the specified System.Type.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext /// A /// that provides a format context. ///
destinationType System.Type /// A that represents the /// you want to convert to. ///
Результат bool

ConvertFrom() публичный Метод

Converts the given value to the type of this converter.
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext /// A /// that provides a format context. ///
culture System.Globalization.CultureInfo /// The to use /// as the current culture. ///
value object /// The value that is to be converted. ///
Результат object

ConvertTo() публичный Метод

Converts the given value object to the specified type, using the specified context and culture information.
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext /// A /// that provides a format context. ///
culture System.Globalization.CultureInfo /// The to use /// as the current culture. ///
value object /// The value that is to be converted. ///
destinationType System.Type /// The to convert the /// parameter to. ///
Результат object

RuntimeTypeConverter() публичный Метод

Creates a new instance of the Spring.Core.TypeConversion.RuntimeTypeConverter class.
public RuntimeTypeConverter ( ) : System
Результат System