Support .NET 3.5.
veblush opened this issue · comments
After getting .net core done, it will be nice to support .NET 3.5 which Unity3D still uses. There are two things to suppor this:
- Add ConcurrentDictionary which was introduced at .NET 4. But it's trivial because there is an alternative one.
- Add workaround for dynamic code which was also introduced at .NET 4. But with #38, there is nothing to do for this.
How about this?
If we can support the same format so the serializers will be compatible, I see no problem in supporting both this and #38
Are your changes the only thing needed or are there other changes to the serializer factories also that needs to be done?
I believe that basically there is no difference of serialized stream between .NET 3.5 and .NET 4.5. But there must be the edge case. For example, if there is a class which is handled by CodeGenerator.BuildSerializer and this class has a different fields layout between .NET 3.5 and .NET 4.5, it will fail in transfering a serialized instance of this class from .NET 3.5 to .NET 4.5 and vise versa.
For changes for this issue, you can see the experimental commit which will be not PR. There are some workarounds for CodeGenerator, ArraySerializerFactory, and ConsistentArraySerializer which use generic and dynamic.
Closing as out of scope