how to store XML serialization info such as mappings between properties and attributes/elements outside of a class declaration? I suppose my class objects could come from different datasources and I don’t want them to keep extrainformation. Maybe something like MetadataClassAttribute in mvc could help, when I store xml metadata in different class?
Thank you,
how to store XML serialization info such as mappings between properties and attributes/elements outside
Share
If you are doing this via XmlSerializer, the XmlAttibuteOverrides is the thing to look at, but nte this doesn’t have save/load facilities – you’d have to write te overrides manually, or write your own generalised abstraction layer. Also: you must store as reuse serializers created from XmlAttributeOverrides, or you will bleed assemblies.