public sealed class AutoResetEvent : WaitHandle
|
ctor #1 | Initializes a new instance of the AutoResetEvent class with a Boolean value indicating whether to set the initial state to signaled. |
Handle (inherited from System.Threading.WaitHandle) |
Read-write See base class member description: System.Threading.WaitHandle.Handle Gets or sets the native operating system handle. |
Close (inherited from System.Threading.WaitHandle) |
See base class member description: System.Threading.WaitHandle.Close When overridden in a derived class, releases all resources held by the current WaitHandle. |
CreateObjRef (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
InitializeLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. |
Reset | Sets the state of the specified event to nonsignaled. |
Set | Sets the state of the specified event to signaled. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
WaitOne (inherited from System.Threading.WaitHandle) |
Overloaded:WaitOne() See base class member description: System.Threading.WaitHandle.WaitOneWhen overridden in a derived class, blocks the current thread until the current WaitHandle receives a signal. |
WaitOne (inherited from System.Threading.WaitHandle) |
Overloaded:WaitOne(int millisecondsTimeout, bool exitContext) See base class member description: System.Threading.WaitHandle.WaitOneWhen overridden in a derived class, blocks the current thread until the current WaitHandle receives a signal, using 32-bit signed integer to measure the time interval and specifying whether to exit the synchronization domain before the wait. |
WaitOne (inherited from System.Threading.WaitHandle) |
Overloaded:WaitOne(TimeSpan timeout, bool exitContext) See base class member description: System.Threading.WaitHandle.WaitOneWhen overridden in a derived class, blocks the current thread until the current instance receives a signal, using a TimeSpan to measure the time interval and specifying whether to exit the synchronization domain before the wait. |
Dispose (inherited from System.Threading.WaitHandle) |
See base class member description: System.Threading.WaitHandle.Dispose When overridden in a derived class, releases the unmanaged resources used by the WaitHandle, and optionally releases the managed resources. |
Finalize (inherited from System.Threading.WaitHandle) |
See base class member description: System.Threading.WaitHandle.Finalize Releases the resources held by the current instance. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public AutoResetEvent( |
initialState
public virtual IntPtr Handle {get; set;}
|
Exception Type | Condition |
---|---|
SecurityException | The caller does not have the required permission. |
public virtual void Close(); |
This method releases any unmanaged resources held by the current instance. This method can, but is not required to, suppress finalization during garbage collection by calling the GC.SuppressFinalize method.
Override this method to release resources allocated in derived classes.
Use this method to release all resources held by an instance of WaitHandle. Once this method is called, references to the current instance cause undefined behavior.
requestedType
Exception Type | Condition |
---|---|
RemotingException | This instance is not a valid remoting object. |
protected virtual void Dispose( |
explicitDisposing
When the explicitDisposing parameter is true, this method releases all resources held by any managed objects that this WaitHandle references. This method invokes the Dispose() method of each referenced object.
Dispose can be called multiple times by other objects. When overriding this method, be careful not to reference objects that have been previously disposed in an earlier call to Dispose or Close.
~WaitHandle(); |
public virtual int GetHashCode(); |
public object GetLifetimeService(); |
public Type GetType(); |
public virtual object InitializeLifetimeService(); |
public class MyClass : MarshalByRefObject { public override Object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (lease.CurrentState == LeaseState.Initial) { lease.InitialLeaseTime = TimeSpan.FromMinutes(1); lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); lease.RenewOnCallTime = TimeSpan.FromSeconds(2); } return lease; } }
protected object MemberwiseClone(); |
public bool Reset(); |
public bool Set(); |
public virtual string ToString(); |
public virtual bool WaitOne(); |
Override this method to customize the behavior of derived classes.
millisecondsTimeout
exitContext
Override this method to customize the behavior of derived classes.
timeout
exitContext
Override this method to customize the behavior of derived classes.