1
Vote

XmlFormatter2, SortedDictionary<> does not deserialize.

description

When deserializing a sorted dictionary generic object it thows a exception
 
System.InvalidCastException: Object must implement IConvertible..
 
Stack Trace
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
at System.Collections.Generic.TreeSet1.OnDeserialization(Object sender)
at System.Collections.Generic.TreeSet
1.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(Object sender)
at Pegasus.Runtime.Serialization.Formatters.FormatterObjectManager.FireOnDeserializationCompleteEvent() in D:\Pegasus@CodePlex\Pegasus.Library\Runtime\Serialization\Formatters\FormatterObjectManager.cs:line 296
at Pegasus.Runtime.Serialization.Formatters.Xml.XmlFormatter2.Deserialize(Stream serializationStream) in D:\Pegasus@CodePlex\Pegasus.Library\Runtime\Serialization\Formatters\Xml\XmlFormatter2.cs:line 226
at Pegasus.UnitTests.Runtime.Serialization.Formatters.Xml.XmlFormatter2Tests.XmlFormatter2Helper.SerializeDeserialize(Object obj, SurrogateSelector selector, StreamingContext context) in D:\Pegasus@CodePlex\Pegasus.Library.UnitTests\Runtime\Serialization\Formatters\Xml\XmlFormatter2Tests\XmlFormatter2Helper.cs:line 58
at Pegasus.UnitTests.Runtime.Serialization.Formatters.Xml.XmlFormatter2Tests.XmlFormatter2Helper.SerializeDeserialize(Object obj) in D:\Pegasus@CodePlex\Pegasus.Library.UnitTests\Runtime\Serialization\Formatters\Xml\XmlFormatter2Tests\XmlFormatter2Helper.cs:line 29
at Pegasus.UnitTests.Runtime.Serialization.Formatters.Xml.XmlFormatter2Tests.XmlFormatter2CollectionsTests.SerializeSortedDictionary() in D:\Pegasus@CodePlex\Pegasus.Library.UnitTests\Runtime\Serialization\Formatters\Xml\XmlFormatter2Tests\XmlFormatter2CollectionsTests.cs:line 111

comments

droberts wrote Jun 21, 2007 at 9:11 PM

Blane, I fixed this.

** Closed by droberts 6/21/2007 1:53 PM

lexnn wrote Jun 21, 2007 at 9:11 PM

Deven didn't fix this. He just thinks he did.

wrote Feb 13, 2013 at 2:08 AM