المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : SOAP versioning limits - loading legacy assembly



C# Programming
07-29-2011, 07:11 PM
Hi experts,

there is an application that can save some data on user request. In the application, data is held in objects that composit larger objects. Their corresponding classes inherit from one another and from abstract base classes. In order to save this all to disk it is thrown at a SoapFormatter.

SoapFormatter can again read the saved file and create the objects as they were before.

In the future, requests will change. So the classes will have to change.

Should there be any new properties to a class, I know I can add it using OptionalFieldAttribute to load. Should properties become obsolete, I can just leave them where they are, don't use them, let the storage get a little bigger than needed and have no problem with it.

How can I handle larger changes?

Is there a way to load the "old" assembly into memory, let it load the old storage file and retrieve the object structure from it programatically?
This way, "new" classes could be able to construct from "old" ones.

Ciao,


luker