google-code-export / fluorinefx

Automatically exported from code.google.com/p/fluorinefx
2 stars 4 forks source link

ReflectionUtils.GetTypeConverter NullReferenceException when target type does not have a TypeConverter #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
ReflectionUtils.GetTypeConverter() throw exception when the target
type does not have a TypeConverter attribute.

Reproduction steps:
Call an endpoint returning a type containing a generic list member (eg 
SampleClass { public List<int> PropertyCausingCrash { get; set; }; } ) from 
a SilverLight application.

Resolution:
Adding "if (typeConverterAttribute == null) return null;" before the return 
statement in ReflectionUtils.GetTypeConverter [Util/ReflectionUtils:685] 
fixes this issue & allows for deserialisation to List<*> instead of 
ArrayCollection within Silverlight.

What version of the product are you using? On what operating system?
Windows XP SP3
Visual Studio 2008
SilverLight 3
FluorineFX 1.0.0.15 (source debug build)

Original issue reported on code.google.com by daniel.l...@gmail.com on 20 Oct 2009 at 3:25