Table of Contents

CreateNonCapturingTimer Method

Definition

Namespace
Cuemon.Threading
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Threading/TimerFactory.cs

CreateNonCapturingTimer(TimerCallback, object, TimeSpan, TimeSpan)

Initializes a new instance of the Timer class that suppress capturing the ExecutionContext.

public static Timer CreateNonCapturingTimer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)

Parameters

callback TimerCallback

A delegate representing a method to be executed.

state object

An object containing information to be used by the callback method, or null.

dueTime TimeSpan

The amount of time to delay before the callback is invoked. Specify InfiniteTimeSpan to prevent the timer from starting. Specify Zero to start the timer immediately.

period TimeSpan

The time interval between invocations of callback. Specify InfiniteTimeSpan to disable periodic signaling.

Returns

Timer

A new Timer instance that suppress capturing the ExecutionContext.

Remarks