private static TypeConverter RegisterTypeConverterFor(Type type)
{
var converter_attr = type.GetAttribute<TypeConverterAttribute>();
if ( converter_attr != null ) {
// What is the difference between these two conditions?
TypeConverterSpecified[type] = true;
var converterType = TypeUtils.GetType(converter_attr.ConverterTypeName);
return TypeConverters[type] = Activator.CreateInstance(converterType) as TypeConverter;
} else {
// What is the difference between these two conditions?
TypeConverterSpecified[type] = false;
return TypeConverters[type] = TypeDescriptor.GetConverter(type);
}
}