I just stumbled across OnDeserializedAttribute on MSDN. The description states
When applied to a method, specifies that the method is called immediately after deserialization of an object in an object graph. The order of deserialization relative to other objects in the graph is non-deterministic.
Questions
- Is a method with this attribute called for any serializer?
- If so, how does .NET ensure the method is called for an arbitrary serializer?
- If not, is it supported for all of the "common" serializers (BinaryFormatter, XmlSerializer, JSON Serializer, DataContractSerializer)?