diff --git a/src/Eto/Forms/Clipboard.cs b/src/Eto/Forms/Clipboard.cs index a2ebc90a8e..a1890b4444 100644 --- a/src/Eto/Forms/Clipboard.cs +++ b/src/Eto/Forms/Clipboard.cs @@ -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; } } @@ -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) { diff --git a/src/Eto/Forms/DataObject.cs b/src/Eto/Forms/DataObject.cs index dd600b734d..017575ead3 100644 --- a/src/Eto/Forms/DataObject.cs +++ b/src/Eto/Forms/DataObject.cs @@ -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; } } @@ -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) {