I am using serialization in different use case in the same process.
Sometime I want to exclude a member of a class in a given serialization and in other occasion, I want to include it. The cache in PropertyProvider is preventing me to use the serializer in that way.
For a simple test, I used :
SharpSerializer serializer1 = new SharpSerializer();
var settingsnoattrib = new SharpSerializerXmlSettings();
SharpSerializer serializer2 = new SharpSerializer(settingsnoattrib);
File1 and File2 will be identical and that an issue for me.
If I reverse the order of the code, the attribute will be removed in both serialization.
I changed the code to add a Clear of the cache when the _attributesToIgnore (PropertyProvider.cs) is changed, but since its done at each construction of the Sharserializer, I am losing the cache optimization. I could add more code to help but before ....
Is there a way to your released Sharpserializer to answer my use case ?