Skip to content

)} })} })} })} })} })}

Scheduler.Schedule(IScheduler, Action) method

Defined in

Type: Scheduler Namespace: System.Reactive.Concurrency Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IDisposable Schedule(this IScheduler scheduler, Action<Action> action)
  • 2. public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, Action<TState, Action<TState>> action)
  • 3. public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action<Action<TimeSpan>> action)
  • 4. public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Action<TState, Action<TState, TimeSpan>> action)
  • 5. public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action<Action<DateTimeOffset>> action)
  • 6. public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Action<TState, Action<TState, DateTimeOffset>> action)
  • 7. public static IDisposable Schedule(this IScheduler scheduler, Action action)
  • 8. public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action action)
  • 9. public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action action)

1. Overload

public static IDisposable Schedule(this IScheduler scheduler, Action<Action> action)

Summary: Schedules an action to be executed recursively.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
actionActionAction to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

2. Overload

public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, Action<TState, Action<TState>> action)

Summary: Schedules an action to be executed recursively.

Type parameters

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

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
stateTStateState passed to the action to be executed.
actionAction>Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

3. Overload

public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action<Action<TimeSpan>> action)

Summary: Schedules an action to be executed recursively after a specified relative due time.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
dueTimeTimeSpanRelative time after which to execute the action for the first time.
actionAction>Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified relative time.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

4. Overload

public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Action<TState, Action<TState, TimeSpan>> action)

Summary: Schedules an action to be executed recursively after a specified relative due time.

Type parameters

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

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
stateTStateState passed to the action to be executed.
dueTimeTimeSpanRelative time after which to execute the action for the first time.
actionAction>Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

5. Overload

public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action<Action<DateTimeOffset>> action)

Summary: Schedules an action to be executed recursively at a specified absolute due time.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
dueTimeDateTimeOffsetAbsolute time at which to execute the action for the first time.
actionAction>Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified absolute time.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

6. Overload

public static IDisposable Schedule<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Action<TState, Action<TState, DateTimeOffset>> action)

Summary: Schedules an action to be executed recursively at a specified absolute due time.

Type parameters

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

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the recursive action on.
stateTStateState passed to the action to be executed.
dueTimeDateTimeOffsetAbsolute time at which to execute the action for the first time.
actionAction>Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

7. Overload

public static IDisposable Schedule(this IScheduler scheduler, Action action)

Summary: Schedules an action to be executed.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the action on.
actionActionAction to execute.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

8. Overload

public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action action)

Summary: Schedules an action to be executed after the specified relative due time.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the action on.
dueTimeTimeSpanRelative time after which to execute the action.
actionActionAction to execute.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.

9. Overload

public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action action)

Summary: Schedules an action to be executed at the specified absolute due time.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler to execute the action on.
dueTimeDateTimeOffsetAbsolute time at which to execute the action.
actionActionAction to execute.

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

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler or action is null.