VirtualClock.Schedule(IWorkItem) method¶
Defined in
Type: VirtualClock
Namespace: ReactiveUI.Primitives.Concurrency
Assembly: ReactiveUI.Primitives.dll
Applies to
net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net471, net462
Overloads¶
- 1.
public void Schedule(IWorkItem item) - 2.
public void Schedule(IWorkItem item, long dueTimestamp) - 3.
public IDisposable Schedule<TState>(TState state, Func<ISequencer, TState, IDisposable> action) - 4.
public IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<ISequencer, TState, IDisposable> action) - 5.
public IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<ISequencer, TState, IDisposable> action)
1. Overload¶
public void Schedule(IWorkItem item)
Inherited documentation
These docs were inherited from ISequencer. The member doesn't override them on this type.
Summary: Schedules a work item for execution as soon as possible.
Parameters
| Name | Type | Description |
|---|---|---|
item | [IWorkItem](# | Work item to execute. |
2. Overload¶
public void Schedule(IWorkItem item, long dueTimestamp)
Inherited documentation
These docs were inherited from ISequencer. The member doesn't override them on this type.
Summary: Schedules a work item for execution at an absolute monotonic timestamp.
Parameters
| Name | Type | Description |
|---|---|---|
item | [IWorkItem](# | Work item to execute. |
dueTimestamp | long | Absolute monotonic timestamp at which to execute the item. |
3. Overload¶
public IDisposable Schedule<TState>(TState state, Func<ISequencer, TState, IDisposable> action)
Summary: Schedules an action to be executed at the current clock.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
state | TState | State passed to the action to be executed. |
action | Func | Action to be executed. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).
4. Overload¶
public IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<ISequencer, TState, IDisposable> action)
Summary: Schedules an action to be executed after a relative due time.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
state | TState | State passed to the action to be executed. |
dueTime | TimeSpan | Relative time after which to execute the action. |
action | Func | Action to be executed. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).
5. Overload¶
public IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<ISequencer, TState, IDisposable> action)
Summary: Schedules an action to be executed at an absolute date-time.
Type parameters
| Name | Description |
|---|---|
TState | The type of the state passed to the scheduled action. |
Parameters
| Name | Type | Description |
|---|---|---|
state | TState | State passed to the action to be executed. |
dueTime | DateTimeOffset | Absolute date-time at which to execute the action. |
action | Func | Action to be executed. |
Returns: IDisposable -- The disposable object used to cancel the scheduled action (best effort).