C# 클래스 Flatwhite.WebApi.AsyncCountdownEvent

파일 보기 프로젝트 열기: vanthoainguyen/Flatwhite 1 사용 예제들

공개 메소드들

메소드 설명
AddCount ( ) : void

Attempts to add one to the current count. This method throws InvalidOperationException if the count is already at zero or if the new count would be greater than Int32.MaxValue.

AsyncCountdownEvent ( int count ) : System

Creates an async-compatible countdown event.

Signal ( ) : void

Attempts to subtract one from the current count. This method throws InvalidOperationException if the count is already at zero or if the new count would be less than zero.

WaitAsync ( ) : Task

Asynchronously waits for this event to be set.

비공개 메소드들

메소드 설명
ModifyCount ( int signalCount ) : void

Attempts to modify the current count by the specified amount. This method returns false if the new current count value would be invalid, or if the count has already reached zero.

메소드 상세

AddCount() 공개 메소드

Attempts to add one to the current count. This method throws InvalidOperationException if the count is already at zero or if the new count would be greater than Int32.MaxValue.
public AddCount ( ) : void
리턴 void

AsyncCountdownEvent() 공개 메소드

Creates an async-compatible countdown event.
public AsyncCountdownEvent ( int count ) : System
count int The number of signals this event will need before it becomes set. Must be greater than zero.
리턴 System

Signal() 공개 메소드

Attempts to subtract one from the current count. This method throws InvalidOperationException if the count is already at zero or if the new count would be less than zero.
public Signal ( ) : void
리턴 void

WaitAsync() 공개 메소드

Asynchronously waits for this event to be set.
public WaitAsync ( ) : Task
리턴 Task