Skip to content

Commit

Permalink
Allow binaryserializer for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed May 17, 2023
1 parent 5f8cc93 commit 062b2b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Eto/Forms/Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ public void SetObject(object value, string type)
{
using (var ms = new MemoryStream())
{
#pragma warning disable SYSLIB0011
var binaryFormatter = new BinaryFormatter();
binaryFormatter.Serialize(ms, value);
SetDataStream(ms, type);
#pragma warning restore SYSLIB0011
return;
}
}
Expand Down Expand Up @@ -273,8 +275,10 @@ public object GetObject(string type)
return null;
try
{
#pragma warning disable SYSLIB0011
var binaryFormatter = new BinaryFormatter();
return binaryFormatter.Deserialize(stream);
#pragma warning restore SYSLIB0011
}
catch (Exception ex)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Eto/Forms/DataObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,11 @@ public void SetObject(object value, string type)
{
using (var ms = new MemoryStream())
{
#pragma warning disable SYSLIB0011
var binaryFormatter = new BinaryFormatter();
binaryFormatter.Serialize(ms, value);
SetDataStream(ms, type);
#pragma warning restore SYSLIB0011
return;
}
}
Expand Down Expand Up @@ -329,8 +331,10 @@ public object GetObject(string type)
return null;
try
{
#pragma warning disable SYSLIB0011
var binaryFormatter = new BinaryFormatter();
return binaryFormatter.Deserialize(stream);
#pragma warning restore SYSLIB0011
}
catch (Exception ex)
{
Expand Down

0 comments on commit 062b2b5

Please sign in to comment.