New tests.
[mono.git] / mcs / class / corlib / System.Threading / ExecutionContext.cs
index f3adffee767c892fa848a6f53885680bccb4f3ec..684caf0a2e4fc928c72e11a6fe4ae096e2563c71 100644 (file)
@@ -35,12 +35,8 @@ using System.Security.Permissions;
 namespace System.Threading {
 
        [Serializable]
-#if NET_2_0
        public sealed class ExecutionContext : ISerializable {
-#else
-       internal sealed class ExecutionContext : ISerializable {
-#endif
-#if !NET_2_1
+#if !MOONLIGHT
                private SecurityContext _sc;
 #endif
                private bool _suppressFlow;
@@ -52,7 +48,7 @@ namespace System.Threading {
 
                internal ExecutionContext (ExecutionContext ec)
                {
-#if !NET_2_1
+#if !MOONLIGHT
                        if (ec._sc != null)
                                _sc = new SecurityContext (ec._sc);
 #endif
@@ -73,7 +69,7 @@ namespace System.Threading {
                                return null;
 
                        ExecutionContext capture = new ExecutionContext (ec);
-#if !NET_2_1
+#if !MOONLIGHT
                        if (SecurityManager.SecurityEnabled)
                                capture.SecurityContext = SecurityContext.Capture ();
 #endif
@@ -98,7 +94,7 @@ namespace System.Threading {
                }
                
                // internal stuff
-#if !NET_2_1
+#if !MOONLIGHT
                internal SecurityContext SecurityContext {
                        get {
                                if (_sc == null)
@@ -130,7 +126,8 @@ namespace System.Threading {
 
                        ec.FlowSuppressed = false;
                }
-#if NET_2_0 && !NET_2_1
+
+#if !MOONLIGHT
                [MonoTODO ("only the SecurityContext is considered")]
                [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
                public static void Run (ExecutionContext executionContext, ContextCallback callback, object state)
@@ -145,8 +142,7 @@ namespace System.Threading {
 
                        SecurityContext.Run (executionContext.SecurityContext, callback, state);
                }
-#endif
-#if !NET_2_1
+
                public static AsyncFlowControl SuppressFlow ()
                {
                        Thread t = Thread.CurrentThread;