Skip to content

)}

MauiWinUIScheduler.SchedulePeriodic(TState, TimeSpan, Func) method

Defined in

Type: MauiWinUIScheduler Namespace: System.Reactive.Concurrency Assembly: ReactiveMarbles.ViewModel.MAUI.dll

Applies to

net8.0-windows10.0.19041

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

View source

Summary: Schedules a periodic piece of work on the dispatcherQueue, using a DispatcherQueueTimer 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.
periodTimeSpanPeriod for running the work periodically.
actionFuncAction to be executed, potentially updating the state.

Returns: IDisposable -- The disposable object used to cancel the scheduled recurring action (best effort).

Exceptions

TypeCondition
System.ArgumentNullExceptionaction is null.
System.ArgumentOutOfRangeExceptionperiod is less than Zero.