Share via


TaskPoolScheduler.Schedule<TState> Method (TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)

Schedules an action to be executed at dueTime, using a System.Threading.Timer object.

Namespace:  System.Reactive.Concurrency
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Function Schedule(Of TState) ( _
    state As TState, _
    dueTime As DateTimeOffset, _
    action As Func(Of IScheduler, TState, IDisposable) _
) As IDisposable
'Usage
Dim instance As TaskPoolScheduler
Dim state As TState
Dim dueTime As DateTimeOffset
Dim action As Func(Of IScheduler, TState, IDisposable)
Dim returnValue As IDisposable

returnValue = instance.Schedule(state, _
    dueTime, action)
public IDisposable Schedule<TState>(
    TState state,
    DateTimeOffset dueTime,
    Func<IScheduler, TState, IDisposable> action
)
public:
generic<typename TState>
virtual IDisposable^ Schedule(
    TState state, 
    DateTimeOffset dueTime, 
    Func<IScheduler^, TState, IDisposable^>^ action
) sealed
abstract Schedule : 
        state:'TState * 
        dueTime:DateTimeOffset * 
        action:Func<IScheduler, 'TState, IDisposable> -> IDisposable 
override Schedule : 
        state:'TState * 
        dueTime:DateTimeOffset * 
        action:Func<IScheduler, 'TState, IDisposable> -> IDisposable 
JScript does not support generic types and methods.

Type Parameters

  • TState
    The state argument type.

Parameters

  • state
    Type: TState
    State passed to the action to be executed.

Return Value

Type: System.IDisposable
The disposable object used to cancel the scheduled action (best effort).

Implements

IScheduler.Schedule<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)

See Also

Reference

TaskPoolScheduler Class

Schedule Overload

System.Reactive.Concurrency Namespace