perfview
perfview copied to clipboard
Breaking Changes for FastSerialization
Implements a set of breaking changes for FastSerialization.
Highlights:
-
SerializationSettingsare now required when creating a stream for use withFastSerialization. - All non-primitive types must be registered with
Deserializerbefore they can be deserialized. Failure to do so will cause the deserialization operation to fail.
More Details:
- Rename
SerializationConfigurationtoSerializationSettingsand make it a required parameter when creating a stream for use withFastSerialization. - Make
SerializationSettingsread-only once passed into a reader or writer implementation by cloning the object whenever a setting is changed. - Move
StreamReaderAlignmentfrom an optional parameter to reader constructors to a property onSerializationSettings. - All non-primitive types must be registered with
Deserializerbefore they can be deserialized. Failure to do so will cause the deserialization operation to fail. Registration can occur via a call toDeserializer.RegisterTypeorDeserializer.RegisterFactory. -
Deserializeralso supports on-the-fly registration of types and factories via theDeserializer.OnUnregisteredTypeevent. - Removed
Deserializer.RegisterDefaultFactoryandDeserializer.TypeResolverin favor ofDeserializer.OnUnregisteredTypewhich allows for type resolution and factory creation to be performed in one place instead of two.