Indeed, thanks for the report. I just fixed the issue in git.
Atsushi Eno
(2011/03/08 14:06), Uli Hertlein wrote:
> Hi guys,
>
> I am serializing a Dictionary<Guid,SomeClass> to an XML file using
> DataContractSerializer and XmlWriter.
>
> When using 'XmlWriterSettings() { Indent=true }' (and the Dictionary
> contains more than one entry) the de-serialization (using
> DataContractSerializer and Stream) breaks with the following exception:
>
> $ mono ./DictSerializer.exe
> System.Runtime.Serialization.SerializationException: Deserializing
> type 'System.Collections.Generic.Dictionary`2[[System.Guid, mscorlib,
> Version=4.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089],[DictSerializer.Bit, DictSerializer,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. Expecting
> state 'EndElement'. Encountered state 'Element' with name
> 'd2p1:KeyValueOfguidBit' with namespace
> 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'. (10,6)
> at System.Runtime.Serialization.SerializationMap.DeserializeObject
> (System.Xml.XmlReader reader,
> System.Runtime.Serialization.XmlFormatterDeserializer deserializer)
> [0x00000] in <filename unknown>:0
> at
> System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeByMap
> (System.Xml.XmlQualifiedName name, System.Type type,
> System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
> ...
>
> This is with mono-2.10.1, MS .NET 4 is fine.
> Attached a minimal application that demonstrates this behaviour.
> What's the established procedure to file a bug?
>
> Cheers,
> /uli
>
>
> _______________________________________________
> Mono-list maillist - [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list