There's a couple of potential issues with deserializing ISerializable types,
- An ISerializable type's OnDeserializing callback is not called on the actual deserialized object.
- The object added to XmlObjectSerializerReadContext is not the actual deserialized, which may cause wrong behavior in "IsReference=true" scenarios.
The issues occur with both ILGen based and reflection only based serialization. To investigate the issue, we need to look into the following methods,
ReflectionReader.ReflectionReadClass
XmlFormatReaderGeneratorCriticalHelper.GenerateClassReader
JsonFormatReaderGenerator.CriticalHelper.GenerateClassReader
There's a couple of potential issues with deserializing ISerializable types,
The issues occur with both ILGen based and reflection only based serialization. To investigate the issue, we need to look into the following methods,
ReflectionReader.ReflectionReadClassXmlFormatReaderGeneratorCriticalHelper.GenerateClassReaderJsonFormatReaderGenerator.CriticalHelper.GenerateClassReader