-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Use multiple target frameworks for Eto.Forms #2439
Conversation
I dunno how the binary formatter is used in Eto, from what I can tell, only for getting/setting the clipboard value and something related to drag-n-drop.
Keep in mind that the BinaryFormatter in general is insecure, so this affects Eto even if we keep only the .netstandard 2.0 TFM. |
Hey @Miepee, thanks for the PR! Looking into this, I think moving over to XmlSerialization would be best as it doesn't bring in any extra dependencies. We'll have to serialize/deserialize the type along with the actual object data, but it should be fairly straight forward. This functionality is only provided so it is easy to pass a .NET object to/from the clipboard/dataobject easily so as long as it follows the normal serialization process it should work similarly to before. The only scenario I can think of that wouldn't work moving to a different serialization mechanism is if someone is using an object with private members that weren't implemented via the serialization API. I can live with breaking this functionality considering the alternatives. Thanks again for the contribution! |
Another observation: a lot of the obsolete type converters were moved over to using System.ComponentModel.TypeConverter as a base vs. using Eto.TypeConverter, likely due to NETSTANDARD not being defined. This should be reverted. |
@cwensley Think i fixed both of these issues now. |
Just to follow up, I've tested the GetObject/SetObject with these changes and it is completely borked. There are no tests that exercise this behaviour which I will try to add to make doing these changes easier. The easiest right now would be to use the deprecated functionality even in .NET 6. |
This reverts commit 8574183.
Went ahead and temporarily disabled the warnings/errors then in order for this to get merged sooner, as a few other PRs I have in my backlog rely on this. |
Great, thanks for the tweaks! I'll try to get those unit tests in there before we need to change the BinaryFormatter out |
Fixes #2248