)} })} )} })} )} })} )} })} )} })} )} })}
Scheduler.ScheduleAsync(IScheduler, TState, Func) method¶
Defined in
Type: Scheduler
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task> action) - 2.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action) - 3.
public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task> action) - 4.
public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task<IDisposable>> action) - 5.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task> action) - 6.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action) - 7.
public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task> action) - 8.
public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action) - 9.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task> action) - 10.
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action) - 11.
public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task> action) - 12.
public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action)
1. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
2. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
3. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
4. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
5. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
6. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
7. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
8. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
9. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
dueTime | DateTimeOffset | Absolute time at which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
10. Overload¶
public static IDisposable ScheduleAsync<TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
state | TState | State to pass to the asynchronous method. |
dueTime | DateTimeOffset | Absolute time at which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
11. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
dueTime | DateTimeOffset | Absolute time at which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |
12. Overload¶
public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action)
Summary: Schedules work using an asynchronous method, allowing for cooperative scheduling in an imperative coding style.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to schedule work on. |
dueTime | DateTimeOffset | Absolute time at which to execute the action. |
action | Func | Asynchronous method to run the work, using Yield and Sleep operations for cooperative scheduling and injection of cancellation points. |
Returns: IDisposable -- Disposable object that allows to cancel outstanding work on cooperative cancellation points or through the cancellation token passed to the asynchronous method.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | scheduler or action is null. |