[Mono-bugs] [Bug 40881][Nor] Changed - XML serialization of enum caused InvalidCastException

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 5 Jun 2003 18:56:56 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by duncan@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=40881

--- shadow/40881	Mon Apr  7 14:37:40 2003
+++ shadow/40881.tmp.30541	Thu Jun  5 18:56:56 2003
@@ -41,6 +41,37 @@
 <TestValues>Value1 Value2</TestValues>
 
 ------- Additional Comments From gert.driesen@pandora.be  2003-04-07 14:36 -------
 Created an attachment (id=3957)
 repro class for XmlSerializer bug
 
+
+------- Additional Comments From duncan@ximian.com  2003-06-05 18:56 -------
+Okay, I ran this again today and this bug is still there.
+
+diphthong:~/tmp $ mono enum.exe
+<?xml version="1.0" encoding="iso-8859-1"?>
+<TestValues xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+Unhandled Exception: System.InvalidOperationException: Invalid
+enumeration value: Value1, Value2
+in <0x000b6> 00 System.Xml.Serialization.EnumMap:GetXmlName (string)
+in <0x0005b> 00
+System.Xml.Serialization.XmlSerializationWriterInterpreter:GetEnumXmlValue
+(System.Xml.Serialization.XmlTypeMapping,object)
+in <0x0002c> 00
+System.Xml.Serialization.XmlSerializationWriterInterpreter:WriteEnumElement
+(System.Xml.Serialization.XmlTypeMapping,object,string,string)
+in <0x002d2> 00
+System.Xml.Serialization.XmlSerializationWriterInterpreter:WriteObject
+(System.Xml.Serialization.XmlTypeMapping,object,string,string,bool,bool,bool)
+in <0x000f1> 00
+System.Xml.Serialization.XmlSerializationWriterInterpreter:WriteObject
+(object)
+in <0x0000e> 00 System.Xml.Serialization.XmlSerializer:Serialize
+(object,System.Xml.Serialization.XmlSerializationWriter)
+in <0x00045> 00 System.Xml.Serialization.XmlSerializer:Serialize
+(System.Xml.XmlWriter,object,System.Xml.Serialization.XmlSerializerNamespaces)in
+<0x0005f> 00 System.Xml.Serialization.XmlSerializer:Serialize
+(System.IO.TextWriter,object)
+in <0x00077> 00 Tests.XmlSerializerTest:Main ()
+