Author: spouliot
Date: 2005-12-01 10:49:52 -0500 (Thu, 01 Dec 2005)
New Revision: 53770

Modified:
   
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
   
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
Log:
2005-12-01  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * BinaryFormatter.cs: Added a demand for SerializationFormatter on 
        Serialize method (to make some CAS test work correctly).



Modified: 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
===================================================================
--- 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
    2005-12-01 15:31:50 UTC (rev 53769)
+++ 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs
    2005-12-01 15:49:52 UTC (rev 53770)
@@ -5,10 +5,8 @@
 //  Lluis Sanchez Gual ([EMAIL PROTECTED])
 //
 // (C) 2002 Ximian, Inc.  http://www.ximian.com
-
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -29,12 +27,11 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Runtime.Serialization.Formatters;
-using System.Runtime.Serialization;
 using System.Reflection;
 using System.Collections;
 using System.IO;
 using System.Runtime.Remoting.Messaging;
+using System.Security.Permissions;
 
 namespace System.Runtime.Serialization.Formatters.Binary {
 
@@ -187,10 +184,11 @@
                        Serialize (serializationStream, graph, null);
                }
 
+               [SecurityPermission (SecurityAction.Demand, 
SerializationFormatter = true)]
                public void Serialize(Stream serializationStream, object graph, 
Header[] headers)
                {
                        if(serializationStream==null) {
-                               throw new 
ArgumentNullException("serializationStream is null");
+                               throw new ArgumentNullException 
("serializationStream");
                        }
 
                        BinaryWriter writer = new BinaryWriter 
(serializationStream);

Modified: 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
===================================================================
--- 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog 
    2005-12-01 15:31:50 UTC (rev 53769)
+++ 
trunk/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog 
    2005-12-01 15:49:52 UTC (rev 53770)
@@ -1,3 +1,8 @@
+2005-12-01  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * BinaryFormatter.cs: Added a demand for SerializationFormatter on 
+       Serialize method (to make some CAS test work correctly).
+
 2005-05-26  Ben Maurer  <[EMAIL PROTECTED]>
 
        * CodeGenerator.cs: Move module creation to cctor to kill double

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to