[Mono-bugs] [Bug 519442] Inconsistent XML serialization between Mono 2.4 and .NET 3.5 throwing InvalidOperationException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 27 08:04:22 EST 2010



Atsushi Enomoto <aenomoto at novell.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #14 from Atsushi Enomoto <aenomoto at novell.com> 2010-01-27 13:04:20 UTC ---
> They won't fix or even look at the issue without "proof" that the issue
> is with them and not Mono, since everything is working on .NET.

Here is a proof lines of code: it prints nothing, which means Type.GetMethod()
returns null.

var dt = typeof (IDictionary<string,string>);
var pt = typeof (KeyValuePair<string,string>);
Console.WriteLine (dt.GetMethod ("Add", new Type [] {pt}));


Searches for the specified *public* method whose parameters match the specified
argument types.

(emphasis by me.)

Since IDictionary<K,V>.Add(KeyValuePair<K,V>) is *not* a "public" method, it
hence does not meet the condition explained at

XmlSerializer can process classes that implement IEnumerable  or ICollection
differently if they meet certain requirements, as follows.

A class that implements IEnumerable must implement a public Add method that
takes a single parameter. The Add method's parameter must be consistent
(polymorphic) with the type returned from the IEnumerator.Current property
returned from the GetEnumerator method.


BTW who in the NHibernate team told you like I quoted above? I'll contact him
or her to persuade to fix it. The fix is very easy and could be done without
harm. If they are productive hackers they'll change it.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list