Tue Sep 10 12:12:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System.Threading / ManualResetEvent.cs
1 //
2 // System.Threading.ManualResetEvent.cs
3 //
4 // Author:
5 //   Dick Porter (dick@ximian.com)
6 //   Veronica De Santis (veron78@interfree.it)
7 //
8 // (C) Ximian, Inc.  http://www.ximian.com
9 //
10
11 using System;
12 using System.Runtime.CompilerServices;
13
14 namespace System.Threading 
15 {
16
17         public sealed class ManualResetEvent : WaitHandle 
18         {
19                 // Constructor
20                 public ManualResetEvent (bool initialState)
21                 {
22                         os_handle = NativeEventCalls.CreateEvent_internal (true, initialState, null);
23                 }
24
25                 // Methods
26
27                 public bool Set()
28                 {
29                         return (NativeEventCalls.SetEvent_internal (os_handle));
30                 }
31
32                 public bool Reset()
33                 {
34                         return(NativeEventCalls.ResetEvent_internal (os_handle));
35                 }
36
37         }
38 }