Merge branch 'master'
[mono.git] / mcs / class / corlib / System.Threading / HostExecutionContext.cs
index 4bc912392c8caf19fc69f103c26aefdb05ff7feb..9008cf2d076c3521267ab0729b9a2805ebc869d9 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
-using System.Runtime.InteropServices;
-
 namespace System.Threading {
 
-       [ComVisible (false)]
-       public class HostExecutionContext {
+       [MonoTODO ("Useless until the runtime supports it")]
+       public class HostExecutionContext : IDisposable {
 
-               protected internal object state;
+               private object _state;
 
                public HostExecutionContext ()
                {
-                       state = null;
+                       _state = null;
                }
 
                public HostExecutionContext (object state)
                {
-                       this.state = state;
+                       _state = state;
                }
 
                public virtual HostExecutionContext CreateCopy ()
                {
-                       return new HostExecutionContext (state);
+                       return new HostExecutionContext (_state);
+               }
+
+               protected internal object State {
+                       get { return _state; }
+                       set { _state = value; }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               public virtual void Dispose (bool disposing)
+               {
                }
        }
 }
-
-#endif