Scheduler.Schedule<TState> 方法 (IScheduler、TState、DateTimeOffset、Action<TState、Action<TState、DateTimeOffset>>)

计划在每个 dueTime 以递归方式执行的操作。

Namespace:System.Reactive.Concurrency
装配: System.Reactive.dll) 中的 System.Reactive (

语法

'Declaration
<ExtensionAttribute> _
Public Shared Function Schedule(Of TState) ( _
    scheduler As IScheduler, _
    state As TState, _
    dueTime As DateTimeOffset, _
    action As Action(Of TState, Action(Of TState, DateTimeOffset)) _
) As IDisposable
'Usage
Dim scheduler As IScheduler
Dim state As TState
Dim dueTime As DateTimeOffset
Dim action As Action(Of TState, Action(Of TState, DateTimeOffset))
Dim returnValue As IDisposable

returnValue = scheduler.Schedule(state, _
    dueTime, action)
public static IDisposable Schedule<TState>(
    this IScheduler scheduler,
    TState state,
    DateTimeOffset dueTime,
    Action<TState, Action<TState, DateTimeOffset>> action
)
[ExtensionAttribute]
public:
generic<typename TState>
static IDisposable^ Schedule(
    IScheduler^ scheduler, 
    TState state, 
    DateTimeOffset dueTime, 
    Action<TState, Action<TState, DateTimeOffset>^>^ action
)
static member Schedule : 
        scheduler:IScheduler * 
        state:'TState * 
        dueTime:DateTimeOffset * 
        action:Action<'TState, Action<'TState, DateTimeOffset>> -> IDisposable 
JScript does not support generic types and methods.

类型参数

  • TState
    状态参数类型。

参数

  • state
    类型:TState
    传递给要执行的操作的状态。

返回值

类型: System.IDisposable
用于取消计划操作的可释放对象 (尽最大努力) 。

使用说明

在 Visual Basic 和 C# 中,可以将此方法作为 IScheduler 类型的任何对象的实例方法调用。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅

另请参阅

参考

Scheduler 类

计划重载

System.Reactive.Concurrency 命名空间