C# 클래스 EpLibrary.cs.EventEx

A class that handles the event functionality.
상속: BaseLock, IDisposable
파일 보기 프로젝트 열기: juhgiyo/EpLibrary.cs 1 사용 예제들

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