VirtualTimeSchedulerBase<TAbsolute, TRelative> 类

表示虚拟时间计划器的基类。

继承层次结构

System.Object
  System.Reactive.Concurrency.VirtualTimeSchedulerBase<TAbsolute、 TRelative>
    System.Reactive.Concurrency.HistoricalSchedulerBase
    System.Reactive.Concurrency.VirtualTimeScheduler<TAbsolute、 TRelative>

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

语法

'Declaration
Public MustInherit Class VirtualTimeSchedulerBase(Of TAbsolute, TRelative) _
    Implements IScheduler
'Usage
Dim instance As VirtualTimeSchedulerBase(Of TAbsolute, TRelative)
public abstract class VirtualTimeSchedulerBase<TAbsolute, TRelative> : IScheduler
generic<typename TAbsolute, typename TRelative>
public ref class VirtualTimeSchedulerBase abstract : IScheduler
[<AbstractClassAttribute>]
type VirtualTimeSchedulerBase<'TAbsolute, 'TRelative> =  
    class
        interface IScheduler
    end
JScript does not support generic types and methods.

类型参数

  • TAbsolute
    绝对时间参数类型。
  • TRelative
    相对时间参数类型。

VirtualTimeSchedulerBase<TAbsolute, TRelative> 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 VirtualTimeSchedulerBase<TAbsolute, TRelative> () 为初始时钟值创建默认值为 TAbsolute 的新虚拟时间计划程序。
受保护的方法 VirtualTimeSchedulerBase<TAbsolute、TRelative> (TAbsolute、IComparer<TAbsolute>) 创建新的虚拟时间计划程序。

顶部

属性

  名称 说明
公共属性 时钟 获取计划器的绝对时间时钟值。
受保护的属性 比较器 获取用于比较绝对时间值的比较器。
公共属性 IsEnabled 获取是否启用计划程序来运行工作。
公共属性 Now 获取计划程序当前时间的概念。

顶部

方法

  名称 说明
受保护的方法 添加 将相对时间添加到绝对时间值。
Public method Public method AdvanceBy 按指定的相对时间提前计划程序时钟,运行为该时间跨度计划的所有工时。
Public method Public method AdvanceTo 将计划程序时钟提前到指定时间,运行所有工作到该时间点。
Public method Public method 等于 (继承自 Object.)
受保护的方法 完成 (继承自 Object.)
Public method Public method GetHashCode (继承自 Object.)
受保护的方法 GetNext 获取要执行的下一个计划项。
Public method Public method GetType (继承自 Object.)
受保护的方法 MemberwiseClone (继承自 Object.)
Public method Public method 计划<TState> (TState、Func<IScheduler、TState、IDisposable>) 计划要执行的操作。
Public method Public method 计划<TState> (TState、DateTimeOffset、Func<IScheduler、TState、IDisposable>) 计划将在 dueTime 执行的操作。
Public method Public method 计划<TState> (TState、TimeSpan、Func<IScheduler、TState、IDisposable>) 安排在 dueTime 之后执行的操作。
Public method Public method ScheduleAbsolute<TState> 计划将在 dueTime 执行的操作。
Public method Public method ScheduleRelative<TState> 计划将在 dueTime 执行的操作。
Public method Public method 启动 启动虚拟时间计划程序。
Public method Public method 停止 停止虚拟时间计划程序。
受保护的方法 ToDateTimeOffset 将绝对时间值转换为 DateTimeOffset 值。
受保护的方法 ToRelative 将 TimeSpan 值转换为相对时间值。
Public method Public method ToString (继承自 Object.)

顶部

扩展方法

  名称 说明
公共扩展方法 计划 (操作) 已重载。 计划要执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划 (操作<>) 已重载。 计划以递归方式执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划 (TimeSpan、操作) 已重载。 安排在 dueTime 之后执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划 (DateTimeOffset、操作) 已重载。 计划将在 dueTime 执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划 (时间跨度、操作<操作<时间跨>> 度) 已重载。 计划在每个 dueTime 之后以递归方式执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划 (DateTimeOffset、操作<操作<DateTimeOffset>>) 已重载。 安排在 dueTime 之后执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划<TState> (TState、Action<TState、Action<TState>>) 已重载。 计划以递归方式执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划<TState> (TState、TimeSpan、Action<TState、Action<TState、TimeSpan>>) 已重载。 计划在每个 dueTime 之后以递归方式执行的操作。 由 Scheduler.) 定义的 (
公共扩展方法 计划<TState> (TState、DateTimeOffset、Action<TState、Action<TState、DateTimeOffset>>) 已重载。 计划在每个 dueTime 以递归方式执行的操作。 由 Scheduler.) 定义的 (

顶部

线程安全性

此类型的所有公共静态(Visual Basic 中共享的)成员都是线程安全的。 但不保证所有实例成员都是线程安全的。

另请参阅

参考

System.Reactive.Concurrency 命名空间