Skip to content

)}

UnoWinUIDispatcherScheduler.SchedulePeriodic(TState, TimeSpan, Func) method

Defined in

Type: UnoWinUIDispatcherScheduler Namespace: ReactiveUI.Uno Assembly: ReactiveUI.Uno.dll

Applies to

net11.0-windows10.0.19041, net10.0-windows10.0.19041

public IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<TState, TState> action)

View source (opens in a new tab)

Summary: Schedules a periodic piece of work on the dispatcherQueue, using a DispatcherQueueTimer (opens in a new tab) object.

Type parameters

NameDescription
TStateThe type of the state passed to the scheduled action.

Parameters

NameTypeDescription
stateTStateInitial state passed to the action upon the first iteration.
periodTimeSpan (opens in a new tab)Period for running the work periodically.
actionFunc (opens in a new tab)Action to be executed, potentially updating the state.

Returns: IDisposable (opens in a new tab) -- The disposable object used to cancel the scheduled recurring action (best effort).

Exceptions

TypeCondition
System.ArgumentNullException (opens in a new tab)action is null.
System.ArgumentOutOfRangeException (opens in a new tab)period is less than Zero (opens in a new tab).