C# Class Amib.Threading.Internal.EventWaitHandleFactory

EventWaitHandleFactory class. This is a static class that creates AutoResetEvent and ManualResetEvent objects. In WindowCE the WaitForMultipleObjects API fails to use the Handle property of XxxResetEvent. It can use only handles that were created by the CreateEvent API. Consequently this class creates the needed XxxResetEvent and replaces the handle if it's a WindowsCE OS.
Mostra file Open project: 3di/3di-viewer-rei-libs Class Usage Examples

Public Methods

Method Description
CreateAutoResetEvent ( ) : AutoResetEvent

Create a new AutoResetEvent object

CreateManualResetEvent ( bool initialState ) : ManualResetEvent

Create a new ManualResetEvent object

Private Methods

Method Description
CloseHandle ( IntPtr hObject ) : bool
CreateEvent ( IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName ) : IntPtr
ReplaceEventHandle ( WaitHandle waitHandle, bool manualReset, bool initialState ) : void

Replace the event handle

Method Details

CreateAutoResetEvent() public static method

Create a new AutoResetEvent object
public static CreateAutoResetEvent ( ) : AutoResetEvent
return System.Threading.AutoResetEvent

CreateManualResetEvent() public static method

Create a new ManualResetEvent object
public static CreateManualResetEvent ( bool initialState ) : ManualResetEvent
initialState bool
return System.Threading.ManualResetEvent