Class HistoricalScheduler
Provides a virtual time scheduler that uses DateTimeOffset for absolute time and TimeSpan for relative time.
Inheritance
Inherited Members
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.Linq.dll
Syntax
public class HistoricalScheduler : HistoricalSchedulerBase, IScheduler, IServiceProvider, IStopwatchProvider
Constructors
| Improve this Doc View SourceHistoricalScheduler()
Creates a new historical scheduler with the minimum value of DateTimeOffset as the initial clock value.
Declaration
public HistoricalScheduler()
HistoricalScheduler(DateTimeOffset)
Creates a new historical scheduler with the specified initial clock value.
Declaration
public HistoricalScheduler(DateTimeOffset initialClock)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | initialClock | Initial value for the clock. |
HistoricalScheduler(DateTimeOffset, IComparer<DateTimeOffset>)
Creates a new historical scheduler with the specified initial clock value.
Declaration
public HistoricalScheduler(DateTimeOffset initialClock, IComparer<DateTimeOffset> comparer)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | initialClock | Initial value for the clock. |
| IComparer<DateTimeOffset> | comparer | Comparer to determine causality of events based on absolute time. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Methods
| Improve this Doc View SourceGetNext()
Gets the next scheduled item to be executed.
Declaration
protected override IScheduledItem<DateTimeOffset> GetNext()
Returns
| Type | Description |
|---|---|
| IScheduledItem<DateTimeOffset> | The next scheduled item. |
Overrides
ScheduleAbsolute<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)
Schedules an action to be executed at dueTime.
Declaration
public override IDisposable ScheduleAbsolute<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. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|