//
//
-// 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.
//
+using System.Runtime.InteropServices;
namespace System.Threading
{
- public sealed class RegisteredWaitHandle : MarshalByRefObject
+ [ComVisible (true)]
+ public sealed class RegisteredWaitHandle
+#if !MOONLIGHT
+ : MarshalByRefObject
+#endif
{
WaitHandle _waitObject;
WaitOrTimerCallback _callback;
private void DoCallBack (object timedOut)
{
- if (_callback != null)
- _callback (_state, (bool)timedOut);
+ if (_callback != null) {
+ try {
+ _callback (_state, (bool)timedOut);
+ } catch {}
+ }
lock (this)
{
}
}
+ [ComVisible (true)]
public bool Unregister(WaitHandle waitObject)
{
lock (this)
}
}
+#if ONLY_1_1
[MonoTODO]
~RegisteredWaitHandle() {
// FIXME
}
+#endif
}
}