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.
- Inheritance
-
Wait
For Dispatcher Scheduler
- Implements
-
IScheduler
- Extension Methods
Constructors
WaitForDispatcherScheduler(Func<IScheduler>)
Initializes a new instance of the Wait
Parameters
schedulerFactoryFunc<IScheduler>A func which will return a new scheduler.
Properties
Now
Gets the scheduler's notion of current time.
Property Value
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
stateTStateState passed to the action to be executed.
dueTimeDateTime Offset Absolute time at which to execute the action.
actionFunc<IScheduler, TState, IDisposable>Action to be executed.
Returns
- IDisposable
The disposable object used to cancel the scheduled action (best effort).
Type Parameters
TStateThe type of the state passed to the scheduled action.
Schedule<TState>(TState, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed.
Parameters
stateTStateState passed to the action to be executed.
actionFunc<IScheduler, TState, IDisposable>Action to be executed.
Returns
- IDisposable
The disposable object used to cancel the scheduled action (best effort).
Type Parameters
TStateThe 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
stateTStateState passed to the action to be executed.
dueTimeTimeSpan Relative time after which to execute the action.
actionFunc<IScheduler, TState, IDisposable>Action to be executed.
Returns
- IDisposable
The disposable object used to cancel the scheduled action (best effort).
Type Parameters
TStateThe type of the state passed to the scheduled action.