-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking Changes for FastSerialization (#2121)
* - Rename SerializationConfiguration --> SerializationSettings. - Require an instance of SerializationSettings for serializers and deserializers. * Require a SerializationSettings property for both IStreamReader and IStreamWriter to allow writers to directly create readers. * Refactor SerializationSettings to clone on mutation. This ensures that usres can't change the set of allowed types after it is set and handed to the deserialization code. * Refactor FastSerialization factories and add known types. Remove the ability for FastSerialization to create arbitrary types that are specified in serialized files. Instead, force users to register all types before or during serialization. Types can be registered via calls to Deserializer.RegisterType and Deserializer.RegisterFactory. Users can also implement Deserializer.OnUnregisteredType to handle unregistered types encountered during deserialization. It is incumbent on the implementor to not just blindly call Type.GetType in OnUnregisteredType, and instead only create known types. * Add tests and remove RegisterType(string) because users will need to provide enough context to find the right assembly. * Move StreamReaderAlignment into SerializationSettings. * Undo RID change to HeapDump.csproj. * Rename SetXXX --> WithXXX since it doesn't change the current instance. * Simplify based on feedback.
- Loading branch information
Showing
13 changed files
with
235 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.