This project has moved and is read-only. For the latest updates, please go here.

Custom type converter

Nov 16, 2012 at 12:42 AM
Edited Nov 16, 2012 at 12:43 AM

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 8: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.