public override object ConvertFrom(
System.ComponentModel.ITypeDescriptorContext context,
System.Globalization.CultureInfo culture,
Object value
)
{
Source_GPIOList gpioList = new Source_GPIOList( );
if ( String.IsNullOrEmpty( value as string ) )
{
return gpioList;
}
String[ ] gpioPinStrings = ( value as String ).Split( new Char[ ] { ';' } );
if ( null == gpioPinStrings )
{
return gpioList;
}
foreach ( String s in gpioPinStrings )
{
Object obj = TypeDescriptor.GetConverter( typeof( Source_GPIO ) ).ConvertFromString( s );
if ( null == obj )
{
// TODO : supply err msg || rely on Source_GPIO converter for msg
}
else
{
gpioList.Add( obj as Source_GPIO );
}
}
return gpioList;
}