Table of Contents

Class ControlScheduler

Namespace
Bonsai.Design
Assembly
Bonsai.Design.dll

Represents an object that schedules units of work using the UI thread of a Windows Forms control.

public class ControlScheduler : IScheduler
Inheritance
ControlScheduler
Implements
Inherited Members

Constructors

ControlScheduler(Control)

Initializes a new instance of the ControlScheduler class using the specified control.

public ControlScheduler(Control control)

Parameters

control Control

A Control object whose underlying handle will be used to schedule units of work.

Properties

Control

Gets the control object used to schedule units of work.

public Control Control { get; }

Property Value

Control

Now

Gets the current time according to the local machine's system clock.

public DateTimeOffset Now { get; }

Property Value

DateTimeOffset

Methods

Schedule<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)

public IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action)

Parameters

state TState
dueTime DateTimeOffset
action Func<IScheduler, TState, IDisposable>

Returns

IDisposable

Type Parameters

TState

Schedule<TState>(TState, Func<IScheduler, TState, IDisposable>)

public IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)

Parameters

state TState
action Func<IScheduler, TState, IDisposable>

Returns

IDisposable

Type Parameters

TState

Schedule<TState>(TState, TimeSpan, Func<IScheduler, TState, IDisposable>)

public IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)

Parameters

state TState
dueTime TimeSpan
action Func<IScheduler, TState, IDisposable>

Returns

IDisposable

Type Parameters

TState