C# Класс EpLibrary.cs.EventEx

A class that handles the event functionality.
Наследование: BaseLock, IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Dispose void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Dispose ( bool isDisposing ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

EventEx() публичный Метод

Default Copy Constructor
public EventEx ( EventEx b ) : System
b EventEx the object to copy from
Результат System

EventEx() публичный Метод

Default Constructor
public EventEx ( String eventName = null ) : System
eventName String name of the event to distinguish
Результат System

EventEx() публичный Метод

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
Результат System

GetEventHandle() публичный Метод

Get actual event
public GetEventHandle ( ) : EventWaitHandle
Результат System.Threading.EventWaitHandle

GetEventResetMode() публичный Метод

Returns the flag whether this event is resetting manually.
public GetEventResetMode ( ) : EventResetMode
Результат EventResetMode

Lock() публичный Метод

Locks the critical section
public Lock ( ) : bool
Результат bool

ResetEvent() публичный Метод

Reset the event raised
if event is not raised then no effect
public ResetEvent ( ) : bool
Результат bool

SetEvent() публичный Метод

Set the event to be raised
if event is already raised then no effect this function is same as unlock
public SetEvent ( ) : bool
Результат bool

TryLock() публичный Метод

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
Результат bool

TryLockFor() публичный Метод

Try to lock the critical section for given time
public TryLockFor ( int dwMilliSecond ) : bool
dwMilliSecond int the wait time
Результат bool

Unlock() публичный Метод

Leave the critical section
public Unlock ( ) : void
Результат void

WaitForEvent() публичный Метод

Wait for the event raised for given time
public WaitForEvent ( int dwMilliSecond = Timeout.Infinite ) : bool
dwMilliSecond int the wait time in millisecond
Результат bool