C# Класс Flatwhite.WebApi.AsyncCountdownEvent

Показать файл Открыть проект Примеры использования класса

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

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