http://bugzilla.novell.com/show_bug.cgi?id=601785
http://bugzilla.novell.com/show_bug.cgi?id=601785#c0 Summary: DataContractSerializer must invoke constructor before calling ReadXml on IXmlSerializable types Classification: Mono Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Sys.XML AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.28 Safari/533.4 DataContractSerializer uses FormatterServices.GetUninitializedObject on an IXmlSerializable type, and invokes ReadXml on the raw object. On the other hand, XmlSerializer uses Activator.CreateInstance before invoking ReadXml. I believe that the XmlSerializer usage of IXmlSerializable is definitive. ReadXml can and should assume that it is invoked on a fully constructed object (albeit, constructed from a parameterless constructor). In any case, the attached testcase works fine on .NET but null-refs on Mono trunk. Reproducible: Always (distilled from a WCF session invoking a method that returned a DataTable) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
