// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
public static SynchronizationContext Current
{
- get { return currentContext; }
+ get {
+#if NET_2_1
+ if (currentContext == null)
+ currentContext = new SynchronizationContext ();
+#endif
+ return currentContext;
+ }
}
public virtual SynchronizationContext CreateCopy ()
currentContext = syncContext;
}
+#if NET_2_1
+ [Obsolete]
+ public static void SetThreadStaticContext (SynchronizationContext syncContext)
+ {
+ currentContext = syncContext;
+ }
+#endif
+
[MonoTODO]
protected void SetWaitNotificationRequired ()
{
}
}
}
-
-#endif