I'm working on an app that uses XMLSerialization and SQLite. Both require public accessors. However, there are many instances where I want accessors to return conditional data or only have read access. With SQLite the accessors must both be public, so I can't even use protected. What's the best way to handle this? Do I really need a secondary class that is basically a copy of the serializable class? With XML serialization I could possibly construct my own serialization process, but this is painful and probably worse than a shadow class.
Ideas?
Aucun commentaire:
Enregistrer un commentaire