Custom type converter

Nov 15, 2012 at 11:42 PM
Edited Nov 15, 2012 at 11:43 PM

The generated code allways asume that is easy convert the origin type from his string representation:


Return Me.ConvertFromStringMyType(context, culture, CType(value,String))


But I want to convert from an arbitrary configuration element directly.  The generated code must be:


Return Me.ConvertFromConfigurationElementGeneratedTypeToMyType(context, culture, value)
Nov 16, 2012 at 7:04 AM

The type of the value parameter will always be a string. This value comes straight from an XML attribute, it's always going to be a string. Feel free to correct me if I'm wrong, but if you step through that code, I'm pretty sure you'll see that the value parameter is always going to be a string.