Author: miguel
Date: 2006-12-11 16:18:31 -0500 (Mon, 11 Dec 2006)
New Revision: 69365

Added:
   trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeWaitHandle.cs
Modified:
   trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/ChangeLog
   trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeFileHandle.cs
   trunk/mcs/class/corlib/corlib.dll.sources
Log:
2006-12-11  Miguel de Icaza  <[EMAIL PROTECTED]>

        * SafeWaitHandle.cs: Add new.




Modified: trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/ChangeLog        
2006-12-11 21:11:29 UTC (rev 69364)
+++ trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/ChangeLog        
2006-12-11 21:18:31 UTC (rev 69365)
@@ -1,3 +1,7 @@
+2006-12-11  Miguel de Icaza  <[EMAIL PROTECTED]>
+
+       * SafeWaitHandle.cs: Add new.
+
 2006-12-10  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * SafeFileHandle.cs: Implement this one.

Modified: trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeFileHandle.cs
===================================================================
--- trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeFileHandle.cs        
2006-12-11 21:11:29 UTC (rev 69364)
+++ trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeFileHandle.cs        
2006-12-11 21:18:31 UTC (rev 69365)
@@ -1,10 +1,11 @@
 //
 // Microsoft.Win32.SafeHandles.SafeFileHandle
 //
-// Author
+// Authors:
 //     Sebastien Pouliot  <[EMAIL PROTECTED]>
+//      Miguel de Icaza    <[EMAIL PROTECTED]>
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005, 2006 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

Added: trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeWaitHandle.cs
===================================================================
--- trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeWaitHandle.cs        
2006-12-11 21:11:29 UTC (rev 69364)
+++ trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeWaitHandle.cs        
2006-12-11 21:18:31 UTC (rev 69365)
@@ -0,0 +1,53 @@
+//
+// Microsoft.Win32.SafeHandles.SafeWaitHandle
+//
+// Author:
+//     Sebastien Pouliot  <[EMAIL PROTECTED]>
+//      Miguel de Icaza    <[EMAIL PROTECTED]>
+//
+// Copyright (C) 2005, 2006 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System;
+using System.IO;
+using System.Threading;
+
+namespace Microsoft.Win32.SafeHandles {
+
+       public sealed class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid {
+               public SafeWaitHandle (IntPtr preexistingHandle, bool 
ownsHandle) : base (ownsHandle)
+               {
+                       SetHandle (preexistingHandle);
+               }
+
+               protected override bool ReleaseHandle ()
+               {
+                       NativeEventCalls.CloseEvent_internal 
(DangerousGetHandle ());
+                       return true;
+               }
+
+       }
+}
+
+#endif


Property changes on: 
trunk/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeWaitHandle.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/class/corlib/corlib.dll.sources
===================================================================
--- trunk/mcs/class/corlib/corlib.dll.sources   2006-12-11 21:11:29 UTC (rev 
69364)
+++ trunk/mcs/class/corlib/corlib.dll.sources   2006-12-11 21:18:31 UTC (rev 
69365)
@@ -12,6 +12,7 @@
 Microsoft.Win32/Win32ResultCode.cs
 Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.cs
 Microsoft.Win32.SafeHandles/SafeFileHandle.cs
+Microsoft.Win32.SafeHandles/SafeWaitHandle.cs
 Mono.Globalization.Unicode/CodePointIndexer.cs
 Mono.Globalization.Unicode/MSCompatUnicodeTable.cs
 Mono.Globalization.Unicode/MSCompatUnicodeTableUtil.cs

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to