C# Class EpLibrary.cs.EventEx

A class that handles the event functionality.
Inheritance: BaseLock, IDisposable
Afficher le fichier Open project: juhgiyo/EpLibrary.cs Class Usage Examples

Private Properties

Свойство Type Description
Dispose void

Méthodes publiques

Méthode Description
Dispose ( ) : void
EventEx ( EventEx b ) : System

Default Copy Constructor

EventEx ( String eventName = null ) : System

Default Constructor

EventEx ( bool isInitialRaised, EventResetMode eventResetMode, String eventName = null ) : System

Default Constructor

GetEventHandle ( ) : EventWaitHandle

Get actual event

GetEventResetMode ( ) : EventResetMode

Returns the flag whether this event is resetting manually.

Lock ( ) : bool

Locks the critical section

ResetEvent ( ) : bool

Reset the event raised

if event is not raised then no effect

SetEvent ( ) : bool

Set the event to be raised

if event is already raised then no effect this function is same as unlock

TryLock ( ) : bool

Try to lock the critical section If other thread is already in the critical section, it just returns false and continue, otherwise obtain the ciritical section

TryLockFor ( int dwMilliSecond ) : bool

Try to lock the critical section for given time

Unlock ( ) : void

Leave the critical section

WaitForEvent ( int dwMilliSecond = Timeout.Infinite ) : bool

Wait for the event raised for given time

Private Methods

Méthode Description
Dispose ( bool isDisposing ) : void

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EventEx() public méthode

Default Copy Constructor
public EventEx ( EventEx b ) : System
b EventEx the object to copy from
Résultat System

EventEx() public méthode

Default Constructor
public EventEx ( String eventName = null ) : System
eventName String name of the event to distinguish
Résultat System

EventEx() public méthode

Default Constructor
public EventEx ( bool isInitialRaised, EventResetMode eventResetMode, String eventName = null ) : System
isInitialRaised bool flag to raise the event on creation
eventResetMode EventResetMode EventResetMode
eventName String name of the event to distinguish
Résultat System

GetEventHandle() public méthode

Get actual event
public GetEventHandle ( ) : EventWaitHandle
Résultat System.Threading.EventWaitHandle

GetEventResetMode() public méthode

Returns the flag whether this event is resetting manually.
public GetEventResetMode ( ) : EventResetMode
Résultat EventResetMode

Lock() public méthode

Locks the critical section
public Lock ( ) : bool
Résultat bool

ResetEvent() public méthode

Reset the event raised
if event is not raised then no effect
public ResetEvent ( ) : bool
Résultat bool

SetEvent() public méthode

Set the event to be raised
if event is already raised then no effect this function is same as unlock
public SetEvent ( ) : bool
Résultat bool

TryLock() public méthode

Try to lock the critical section If other thread is already in the critical section, it just returns false and continue, otherwise obtain the ciritical section
public TryLock ( ) : bool
Résultat bool

TryLockFor() public méthode

Try to lock the critical section for given time
public TryLockFor ( int dwMilliSecond ) : bool
dwMilliSecond int the wait time
Résultat bool

Unlock() public méthode

Leave the critical section
public Unlock ( ) : void
Résultat void

WaitForEvent() public méthode

Wait for the event raised for given time
public WaitForEvent ( int dwMilliSecond = Timeout.Infinite ) : bool
dwMilliSecond int the wait time in millisecond
Résultat bool