Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove BinaryFormatter for property bag serialization #7988

Closed
Tracked by #6267
JeremyKuhne opened this issue Oct 21, 2022 · 2 comments
Closed
Tracked by #6267

Remove BinaryFormatter for property bag serialization #7988

JeremyKuhne opened this issue Oct 21, 2022 · 2 comments
Assignees
Labels
area-Serialization-BinaryFormatter-FeatureWork Feature work under the general area of BinaryFormatter related serialization

Comments

@JeremyKuhne
Copy link
Member

Our IPropertyBag implementations rely on BinaryFormatter to serialize to and from a Hashtable/IStream. AxHost.PropertyBagStream and Control.ActiveXImpl.PropertyBagStream are the implementations.

In most of the places we've removed BinaryFormatter we've relied on TypeConverter to convert to/from either string or byte[]. The idea here is to serialize to/from JSON (using System.Text.Json) with this same dependency on TypeConverter. If there is no such TypeConverter for a given type, it would be ignored. Working around this breaking change would require writing and registering a TypeConverter that supports one of these two formats.

#7986 is a related change.

cc: @GrabYourPitchforks

@JeremyKuhne JeremyKuhne added this to the 8.0 Preview1 milestone Oct 21, 2022
@elachlan
Copy link
Contributor

Should we convert from Hashtable to Dictionary<TKey,TValue> as apart of this change? Does it affect the serialization?

@JeremyKuhne JeremyKuhne added the area-Serialization-BinaryFormatter-FeatureWork Feature work under the general area of BinaryFormatter related serialization label May 1, 2023
@JeremyKuhne
Copy link
Member Author

Resolved with: #9104

@ghost ghost removed this from the 8.0 Preview5 milestone May 11, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Serialization-BinaryFormatter-FeatureWork Feature work under the general area of BinaryFormatter related serialization
Projects
None yet
Development

No branches or pull requests

4 participants