[Mono-dev] Re: Mono/.NET interoperability of System.Collections.Specialized

Lluis Sanchez lluis at ximian.com
Mon Oct 10 07:22:30 EDT 2005

Our policy in this topic is explained in the Mono FAQ:


El dl 10 de 10 del 2005 a les 04:06 -0700, en/na Svetlana Zholkovsky va
> > Bug 76235:
> > ------- Additional Comments From Robert Jordan 2005-10-09 22:09
> -------
> > You cannot simply add ISerializable to the inheritance
> > list of ListDictionary and HybridDictionary, because
> > it breaks the API compatibility with MSFT's runtime.
> Hi all,
> The compatibility of the inner representation of the Mono and .NET
> classes is very important, and, in some cases, we need to break API
> compatibility to achieve it. If a class is not implement ISerializable
> interface and it has different from .NET inner structure, we have a
> problem with interoperability, specially in remoting, where the server
> and the client can run on different machines with different runtimes.
> This problem raises not only in the System.Collection.Specialized
> namespace, and we should make a global decision about an our behavior in
> this case.
> For example, one of the possible solutions is to add some new attribute
> to the Serializable class (for instance,
> MonoSerializationCompatibilityAttribute) and the Mono runtime will treat
> such class in the same manner as ISerializable, but outside to the
> clients the class will be seen as regular serializable class according
> to the .NET API. This solution requires changes in the Mono's runtime.
> Another possibility is to change implementation of the class to be fully
> compatible with implementation in .NET. In the HybridDictionary class,
> for example, we should return the previous version of the class and
> treat Hashtable and List as two separate fields. Another alternative is
> to break the API compatibility and implement the ISerializable interface
> to manage the serialization info, as I made.
> What strategy is appropriate? Any other ideas?
> Thanks,
> Svetlana

More information about the Mono-devel-list mailing list