This project is read-only.


Question on AltSerializer.serialize.cs class


I have some question regarding on your implementation in one function of AltSerializer class as following. In the while loop you are trying to SerializeElement with item with its collection data type. I was kind of confused. but I am thinking it should be written as following
while (enumerator.MoveNext())
            SerializeElement(enumerator.Current, objectType.GetType());
private void SerializeList(object genericObject, Type objectType, ObjectMetaData metaData)
        IList ilist = genericObject as IList;
        if (ilist == null)
            throw new AltSerializeException("The object type " + objectType.FullName + " does not implement IList.");
        IEnumerator enumerator = ilist.GetEnumerator();
        while (enumerator.MoveNext())
            SerializeElement(enumerator.Current, objectType);
Closed May 26, 2010 at 9:29 PM by Wobba
AltSerialize will be discarded in the future, so I probably won't fix it.


Wobba wrote May 26, 2010 at 9:28 PM

I did not write AltSerialize, but included it from (noted on the project page).

But it might very well be wrong, but I don't think I will fix it.

When I have time and move this project over to .Net 4.0 I will discard AltSerialize as a serializer and only keep google protocol buffers as an external serializer together with the ones provided with the .net framework.

wrote May 26, 2010 at 9:29 PM

wrote Feb 14, 2013 at 1:12 AM

wrote May 16, 2013 at 6:36 AM