C# 클래스 GSF.Threading.ActionExtensions

Defines extension methods for actions.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
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