[Mono-bugs] [Bug 71332][Maj] New - XmlIgnore ignored for immutable IDictionary property
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 15 Jan 2005 23:30:30 -0500 (EST)
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 scier@posthorizon.com.
http://bugzilla.ximian.com/show_bug.cgi?id=71332
--- shadow/71332 2005-01-15 23:30:30.000000000 -0500
+++ shadow/71332.tmp.12329 2005-01-15 23:30:30.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 71332
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: scier@PostHorizon.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlIgnore ignored for immutable IDictionary property
+
+Description of Problem:
+
+Under Mono 1.1.3, if a type has a property with the type IDictionary (or
+presumably many other ICollections) which has a 'get' method but no 'set',
+serialization fails (correct) -- even if the XmlIgnore attribute is set
+(incorrect). This works under 1.0.5.
+
+Steps to reproduce the problem:
+Compile and run the following:
+ using System.Xml.Serialization;
+
+ public class Blaa {
+ [XmlIgnore]
+ public System.Collections.IDictionary X { get { return null; } }
+
+ public static void Main() {
+ (new XmlSerializer(typeof(Blaa))).Serialize(System.Console.Out,
+ new Blaa()); }
+ }
+
+
+Actual Results:
+Exception thrown:
+ System.InvalidOperationException: You must implement a default
+ accessor on System.Collections.IDictionary because it inherits
+ from ICollection
+
+
+Expected Results:
+Output produced:
+ <Blaa xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
+
+How often does this happen?
+Always