Table of Contents

Class WaitForDispatcherScheduler

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

This scheduler attempts to deal with some of the brain-dead defaults on certain Microsoft platforms that make it difficult to access the Dispatcher during startup. This class wraps a scheduler and if it isn't available yet, it simply runs the scheduled item immediately.

public class WaitForDispatcherScheduler : IScheduler
Inheritance
WaitForDispatcherScheduler
Implements
IScheduler
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Constructors

WaitForDispatcherScheduler(Func<IScheduler>)

Initializes a new instance of the WaitForDispatcherScheduler class.

public WaitForDispatcherScheduler(Func<IScheduler> schedulerFactory)

Parameters

schedulerFactory Func<IScheduler>

A func which will return a new scheduler.

Properties

Now

Gets the scheduler's notion of current time.

public DateTimeOffset Now { get; }

Property Value

DateTimeOffset

Methods

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

Schedules an action to be executed at dueTime.

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

Parameters

state TState

State passed to the action to be executed.

dueTime DateTimeOffset

Absolute time at which to execute the action.

action Func<IScheduler, TState, IDisposable>

Action to be executed.

Returns

IDisposable

The disposable object used to cancel the scheduled action (best effort).

Type Parameters

TState

The type of the state passed to the scheduled action.

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

Schedules an action to be executed.

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

Parameters

state TState

State passed to the action to be executed.

action Func<IScheduler, TState, IDisposable>

Action to be executed.

Returns

IDisposable

The disposable object used to cancel the scheduled action (best effort).

Type Parameters

TState

The type of the state passed to the scheduled action.

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

Schedules an action to be executed after dueTime.

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

Parameters

state TState

State passed to the action to be executed.

dueTime TimeSpan

Relative time after which to execute the action.

action Func<IScheduler, TState, IDisposable>

Action to be executed.

Returns

IDisposable

The disposable object used to cancel the scheduled action (best effort).

Type Parameters

TState

The type of the state passed to the scheduled action.