Hi,
I've been loading and saving serialized LayerOverlays for several months now and it's become clear in my user base that there are some seemingly random failures to deserialize some files even though the session they worked in showed no failures in the save process.
The error messages are typically as follows:
Object of type 'ThinkGeo.MapSuite.Core.InMemoryFeatureSource' cannot be converted to type System.Collections.ObjectModel.Collection`1[ThinkGeo.MapSuite.Core.FeatureSourceColumn]'.
I have tracked the majority of errors to single layer elements in the serialization file. I can't say for certain, but I believe in some instances the hash codes are not being written correctly when I serialize the file and this is why it's confused as to converting the inherited member. The errors typically only occur in files where there are > 1000 layer elements, so possibly some IO issues going on as well.
I have sent 2 example files in a zip file to support@thinkgeo.com with the name of this post as the email subject. The two files are identical with the exception of 1 layer element named Rx119-2 has been removed. With this 1 layer element removed, I can successfully read back the file and display in winforms map.
I have also sent in the same email a test project that can be used to load the two files individually so you can trigger the error and see how the good file displays properly. Since I can't interrogate the GeoSerializer class, I've no idea how to interprete the stack trace or even which line from the input file is causing the problem.
Please look at this as soon as possible. The failures in saving files people have spent a lot of time working on is resulting in some credibility issues.
Thanks and Regards,
Damian