Class HandlerScheduler
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
HandlerScheduler is a scheduler that schedules items on a running Activity's main thread. This is the moral equivalent of DispatcherScheduler.
public class HandlerScheduler : Object, IScheduler, IEnableLogger
- Inheritance
-
HandlerScheduler
- Implements
-
IScheduler
- Extension Methods
Remarks
Initializes a new instance of the HandlerScheduler class.
Constructors
HandlerScheduler(Handler, Nullable<long>)
HandlerScheduler is a scheduler that schedules items on a running Activity's main thread. This is the moral equivalent of DispatcherScheduler.
public HandlerScheduler(Handler handler, Nullable<long> threadIdAssociatedWithHandler)
Parameters
handler
HandlerThe handler.
threadIdAssociatedWithHandler
long?The thread identifier associated with handler.
Remarks
Initializes a new instance of the HandlerScheduler class.
Properties
MainThreadScheduler
Gets a common instance to avoid allocations to the MainThread for the HandlerScheduler.
public static IScheduler MainThreadScheduler { get; }
Property Value
- IScheduler
Now
public DateTimeOffset Now { get; }
Property Value
Methods
Schedule<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)
public IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action)
Parameters
state
TStatedueTime
DateTimeOffsetaction
Func<IScheduler, TState, IDisposable>
Returns
Type Parameters
TState
Schedule<TState>(TState, Func<IScheduler, TState, IDisposable>)
public IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
Parameters
state
TStateaction
Func<IScheduler, TState, IDisposable>
Returns
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
TStatedueTime
TimeSpanaction
Func<IScheduler, TState, IDisposable>
Returns
Type Parameters
TState