C# Класс GSF.Threading.ActionExtensions

Defines extension methods for actions.
Показать файл Открыть проект

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

Метод Описание
DelayAndExecute ( this action, int delay ) : ICancellationToken

Execute an action on the thread pool after a specified number of milliseconds.

DelayAndExecute ( this action, WaitHandle waitObj, int delay ) : void

Execute an action on the thread pool after a specified number of milliseconds.

TryExecute ( this action, Action exceptionHandler ) : bool

Attempts to execute an action and processes exceptions using the given exception handler.

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

DelayAndExecute() публичный статический Метод

Execute an action on the thread pool after a specified number of milliseconds.
public static DelayAndExecute ( this action, int delay ) : ICancellationToken
action this The action to be executed.
delay int The amount of time to wait before execution, in milliseconds.
Результат ICancellationToken

DelayAndExecute() публичный статический Метод

Execute an action on the thread pool after a specified number of milliseconds.
public static DelayAndExecute ( this action, WaitHandle waitObj, int delay ) : void
action this The action to be executed.
waitObj System.Threading.WaitHandle The wait handle to be used to cancel execution.
delay int The amount of time to wait before execution, in milliseconds.
Результат void

TryExecute() публичный статический Метод

Attempts to execute an action and processes exceptions using the given exception handler.
or is null
public static TryExecute ( this action, Action exceptionHandler ) : bool
action this The action to be executed.
exceptionHandler Action The handler to be called in the event of an error.
Результат bool