Closed matthiaszoellner closed 4 years ago
Bug confirmed. I am fixing the problem now.
A fixed version (with additional [Serializable] attributes) has been published as v27.2.1 on NuGet. Please verify that serialization is working now.
First tests confirm it's working in my real world scenario 👍
Thanks for the quick response and fix. Much appreciated.
Excellent. Please be careful how you use serialization, because the internal representation of an AList could change between versions of Loyc.Collections.
I want to serialize a sparse list into ASP.Net Session state. While the
SparseAList<T>
class itself is markedSerializable
, some used base classes are not.Code to reproduce:
Results in a
System.Runtime.Serialization.SerializationException
, complaining, thatLoyc.Collections.Impl.AListLeafBase``2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
is not marked as serializable.Exception text is localized, so I can't provide the full english exception right now.