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;
internal ExecutionContext (ExecutionContext ec)
{
-#if !NET_2_1
+#if !MOONLIGHT
if (ec._sc != null)
_sc = new SecurityContext (ec._sc);
#endif
return null;
ExecutionContext capture = new ExecutionContext (ec);
-#if !NET_2_1
+#if !MOONLIGHT
if (SecurityManager.SecurityEnabled)
capture.SecurityContext = SecurityContext.Capture ();
#endif
}
// internal stuff
-#if !NET_2_1
+#if !MOONLIGHT
internal SecurityContext SecurityContext {
get {
if (_sc == null)
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)
SecurityContext.Run (executionContext.SecurityContext, callback, state);
}
-#endif
-#if !NET_2_1
+
public static AsyncFlowControl SuppressFlow ()
{
Thread t = Thread.CurrentThread;