C# Класс System.Waf.Foundation.ThrottledAction

This class supports throttling of multiple method calls to improve the responsiveness of an application. It delays a method call and skips all additional calls of this method during the delay. The call of the action is synchronized. It uses the current synchronization context that was active during creating this class.
This class is thread-safe.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Cancel ( ) : void

Cancel the execution of the action delegate that was requested.

InvokeAccumulated ( ) : void

Requests the execution of the action delegate.

ThrottledAction ( Action action ) : System.Threading

Initializes a new instance of the ThrottledAction class.

ThrottledAction ( Action action, ThrottledActionMode mode, TimeSpan delayTime ) : System.Threading

Initializes a new instance of the ThrottledAction class.

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

Метод Описание
TimerCallback ( object state ) : void

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

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

Cancel the execution of the action delegate that was requested.
public Cancel ( ) : void
Результат void

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

Requests the execution of the action delegate.
public InvokeAccumulated ( ) : void
Результат void

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

Initializes a new instance of the ThrottledAction class.
The argument action must not be null.
public ThrottledAction ( Action action ) : System.Threading
action Action The action that should be throttled.
Результат System.Threading

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

Initializes a new instance of the ThrottledAction class.
The argument action must not be null.
public ThrottledAction ( Action action, ThrottledActionMode mode, TimeSpan delayTime ) : System.Threading
action Action The action that should be throttled.
mode ThrottledActionMode Defines the throttling mode.
delayTime TimeSpan The delay time.
Результат System.Threading