[Mono-dev] ObservableCollection and BindingList Serialization

David Schmitt david at dasz.at
Tue Mar 12 14:20:27 UTC 2013

On 12.03.2013 13:43, Andres G. Aragoneses wrote:
> On 12/03/13 11:08, David Schmitt wrote:
>> On 12.03.2013 10:47, Robert Jordan wrote:
>>>>   In addition, Windows serializes a variable name _busyCount whereas
>>>> Mono
>>>> defines _count.
>>>>   Also, I note that BindingList serialization on Mono has different and
>>>> missing variable names compared to the .NET equivalent. For example,
>>>> allow_new is allowNew in .NET. In addition, do those serialized
>>>> variables
>>>> need to be public or should they be declared as private?
>>> They must have the same visibility as in MS.NET.
>>> Usually, when a class does not implement ISerializable, Mono's
>>> implementation must be changed to match MS down to member naming.
>>> It's a tedious work given that we don't look at MS' source code...
>> Shouldn't it be possible to extract "clean room" serialization
>> descriptors from the MS implementation without having to look at the
>> source?
> I think you could automate that via mono-api-info with the --abi flag.

That looks interesting, although it does not seem to preserve ordering 
information, and with a quick I've not been able to get it to inspect 
the native mscorlib when installed on windows 7.

>> Extracting that into some kind of stable text format then would enable
>> automated comparisons, no?
> Yes, however, this wouldn't guarantee binary serialization compatibility
> as far as I understand. It would be just the first step, right?

Exactly. But measuring is always the first step to improvement.

Best Regards, David

More information about the Mono-devel-list mailing list