Interface IScheduler
Represents an object that schedules units of work.
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.Interfaces.dll
Syntax
public interface IScheduler
Properties
| Improve this Doc View SourceNow
Gets the scheduler's notion of current time.
Declaration
DateTimeOffset Now { get; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset |
Methods
| Improve this Doc View SourceSchedule<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed at dueTime.
Declaration
IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action)
Parameters
| Type | Name | Description |
|---|---|---|
| TState | state | State passed to the action to be executed. |
| DateTimeOffset | dueTime | Absolute time at which to execute the action. |
| Func<IScheduler, TState, IDisposable> | action | Action to be executed. |
Returns
| Type | Description |
|---|---|
| IDisposable | The disposable object used to cancel the scheduled action (best effort). |
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state passed to the scheduled action. |
Schedule<TState>(TState, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed.
Declaration
IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
Parameters
| Type | Name | Description |
|---|---|---|
| TState | state | State passed to the action to be executed. |
| Func<IScheduler, TState, IDisposable> | action | Action to be executed. |
Returns
| Type | Description |
|---|---|
| IDisposable | The disposable object used to cancel the scheduled action (best effort). |
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state passed to the scheduled action. |
Schedule<TState>(TState, TimeSpan, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed after dueTime.
Declaration
IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
Parameters
| Type | Name | Description |
|---|---|---|
| TState | state | State passed to the action to be executed. |
| TimeSpan | dueTime | Relative time after which to execute the action. |
| Func<IScheduler, TState, IDisposable> | action | Action to be executed. |
Returns
| Type | Description |
|---|---|
| IDisposable | The disposable object used to cancel the scheduled action (best effort). |
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state passed to the scheduled action. |