Author: spouliot
Date: 2005-03-14 18:13:06 -0500 (Mon, 14 Mar 2005)
New Revision: 41811

Modified:
   trunk/mcs/class/corlib/System/ChangeLog
   trunk/mcs/class/corlib/System/Environment.cs
   trunk/mcs/class/corlib/System/Exception.cs
Log:
2005-03-14  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * Environment.cs: Fix CAS unit tests for NET_1_1.
        * Exception.cs: Fix CAS unit tests for NET_1_1.



Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2005-03-14 23:04:47 UTC (rev 
41810)
+++ trunk/mcs/class/corlib/System/ChangeLog     2005-03-14 23:13:06 UTC (rev 
41811)
@@ -1,3 +1,8 @@
+2005-03-14  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * Environment.cs: Fix CAS unit tests for NET_1_1.
+       * Exception.cs: Fix CAS unit tests for NET_1_1.
+
 2005-03-11 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * Version.cs: don't ignore the last number. Fixes bug #73539.

Modified: trunk/mcs/class/corlib/System/Environment.cs
===================================================================
--- trunk/mcs/class/corlib/System/Environment.cs        2005-03-14 23:04:47 UTC 
(rev 41810)
+++ trunk/mcs/class/corlib/System/Environment.cs        2005-03-14 23:13:06 UTC 
(rev 41811)
@@ -377,7 +377,7 @@
                /// <summary>
                /// Return a set of all environment variables and their values
                /// </summary>
-          
+#if NET_2_0
                public static IDictionary GetEnvironmentVariables ()
                {
                        StringBuilder sb = null;
@@ -402,8 +402,18 @@
                        }
                        return vars;
                }
+#else
+               [EnvironmentPermission (SecurityAction.Demand, 
Unrestricted=true)]
+               public static IDictionary GetEnvironmentVariables ()
+               {
+                       Hashtable vars = new Hashtable ();
+                       foreach (string name in GetEnvironmentVariableNames ()) 
{
+                               vars [name] = internalGetEnvironmentVariable 
(name);
+                       }
+                       return vars;
+               }
+#endif
 
-
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private extern static string GetWindowsFolderPath (int folder);
 

Modified: trunk/mcs/class/corlib/System/Exception.cs
===================================================================
--- trunk/mcs/class/corlib/System/Exception.cs  2005-03-14 23:04:47 UTC (rev 
41810)
+++ trunk/mcs/class/corlib/System/Exception.cs  2005-03-14 23:13:06 UTC (rev 
41811)
@@ -35,6 +35,7 @@
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
+using System.Security.Permissions;
 
 namespace System
 {
@@ -121,6 +122,9 @@
                }
 
                public virtual string Source {
+#if ONLY_1_1
+                       [ReflectionPermission (SecurityAction.Assert, 
TypeInformation = true)]
+#endif
                        get {
                                if (source == null) {
                                        StackTrace st = new StackTrace (this, 
true);
@@ -191,6 +195,9 @@
                }
 
                public MethodBase TargetSite {
+#if ONLY_1_1
+                       [ReflectionPermission (SecurityAction.Demand, 
TypeInformation = true)]
+#endif
                        get {
                                StackTrace st = new StackTrace (this, true);
                                if (st.FrameCount > 0)

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

Reply via email to