Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@morganbr
Copy link

@morganbr morganbr commented Jun 1, 2017

Fixes deserializing TimeZoneInfo by putting back the IDeserializationCallback.OnDeserialization method.

@morganbr
Copy link
Author

morganbr commented Jun 1, 2017

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test

@ViktorHofer ViktorHofer merged commit beaefc2 into dotnet:master Jun 1, 2017
ViktorHofer pushed a commit to krwq/coreclr that referenced this pull request Jun 1, 2017
ViktorHofer pushed a commit that referenced this pull request Jun 1, 2017
* Scale back [Serializable] on CoreCLR types (#11765)

Removes SerializableAttribute from CoreCLR types not intended to be serializable as well as adding special handling to MulticastDelegate to prevent serializing delegates (which can't be correctly serialized cross platform/runtime).

* ISerializable cleanup (#11873)

Changes to throw PlatformNotSupportedException from ISerializable.GetObjectData and serialization constructors on non-Serializable types. Also removes private serialization constructors and some unneeded code that was used to support serializing non-serializable types. A few tests testing GetObjectData implementations are also removed. For Exception types, we call base instead of throwing from GetObjectData to be consistent with the many Exceptions that don't override GetObjectData

* IDeserializationCallback cleanup

Throws PlatformNotSupportedException from IDeserializationCallback and IObjectReference implementations on types that are no longer serializable.

* Coretype variables renamed back to netfx counterpart for reflection based serialization (#11910)

* Variables renamed for reflection based serialization

* Make EqualityComparers serialize like desktop

* add missing interfaces

* TimeZone serializable added

* Internal hashtable serializable

* Removed TimeZone as serializable type

* Remove Lazy<T>'s [Serializable] attribute for 2.0

For performance, Lazy was completely rewritten for .NET Core 2.0 and has an entirely different format than desktop; trying to get it to match the desktop serialization format would require either reverting or providing a complicated custom serialization/deserialization implementation to try to match.  Lazy can also wrap an Exception that occurred from trying to instantiate the object, and the only exception types that are serializable as of now in core are the base Exception and AggregateException.  As such, we're cutting it from the list of supported types in 2.0.  An easy workaround is simply to do what the implementation does: serialize lazy.Value instead of lazy.

* tiny fixes to equalitycomparer.cs

* Merge pull request #11995 from ViktorHofer/SerializationFollowUp

Internal hashtable serialization attribute removed

* Fixes deserializaing TimeZoneInfo by putting back the IDeserializationCallback.OnDeserialization method. (#12024)
@morganbr morganbr deleted the TimeZoneInfoSerialization branch June 1, 2017 20:45
@karelz karelz modified the milestone: 2.1.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants