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
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
action | Action | Action 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
state | TState | State passed to the action to be executed. |
action | Action | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
dueTime | TimeSpan | Relative time after which to execute the action for the first time. |
action | Action | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
state | TState | State passed to the action to be executed. |
dueTime | TimeSpan | Relative time after which to execute the action for the first time. |
action | Action | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
dueTime | DateTimeOffset | Absolute time at which to execute the action for the first time. |
action | Action | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the recursive action on. |
state | TState | State passed to the action to be executed. |
dueTime | DateTimeOffset | Absolute time at which to execute the action for the first time. |
action | Action | 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
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
7. Overload¶
public static IDisposable Schedule(this IScheduler scheduler, Action action)
Summary: Schedules an action to be executed.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the action on. |
action | Action | Action to execute. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the action on. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Action | Action to execute. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler 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
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to execute the action on. |
dueTime | DateTimeOffset | Absolute time at which to execute the action. |
action | Action | Action to execute. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |