Virtualtimeschedulerbase(Tabsolute,

VirtualTimeSchedulerBase<TAbsolute, TRelative> Constructor

Creates a new virtual time scheduler with the default value of TAbsolute for the initial clock value.

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

Syntax

'Declaration
Protected Sub New
'Usage

Dim instance As New VirtualTimeSchedulerBase()
protected VirtualTimeSchedulerBase()
protected:
VirtualTimeSchedulerBase()
new : unit -> VirtualTimeSchedulerBase
protected function VirtualTimeSchedulerBase()

See Also

Reference

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Class](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Overload](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

System.Reactive.Concurrency Namespace

VirtualTimeSchedulerBase<TAbsolute, TRelative> Constructor (TAbsolute, IComparer<TAbsolute>)

Creates a new virtual time scheduler.

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

Syntax

'Declaration
Protected Sub New ( _
    initialClock As TAbsolute, _
    comparer As IComparer(Of TAbsolute) _
)
'Usage
Dim initialClock As TAbsolute
Dim comparer As IComparer(Of TAbsolute)

Dim instance As New VirtualTimeSchedulerBase(initialClock, _
    comparer)
protected VirtualTimeSchedulerBase(
    TAbsolute initialClock,
    IComparer<TAbsolute> comparer
)
protected:
VirtualTimeSchedulerBase(
    TAbsolute initialClock, 
    IComparer<TAbsolute>^ comparer
)
new : 
        initialClock:'TAbsolute * 
        comparer:IComparer<'TAbsolute> -> VirtualTimeSchedulerBase
protected function VirtualTimeSchedulerBase(
    initialClock : TAbsolute, 
    comparer : IComparer<TAbsolute>
)

Parameters

  • initialClock
    Type: [TAbsolute](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)
    The initial value for the clock.

  • comparer
    Type: System.Collections.Generic.IComparer<[TAbsolute](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)>
    The comparer to determine causality of events based on absolute time.

See Also

Reference

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Class](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Overload](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

System.Reactive.Concurrency Namespace

VirtualTimeSchedulerBase<TAbsolute, TRelative> Class

Represents the base class for virtual time schedulers.

Inheritance Hierarchy

System.Object
  System.Reactive.Concurrency.VirtualTimeSchedulerBase<TAbsolute, TRelative>
    System.Reactive.Concurrency.HistoricalSchedulerBase
    [System.Reactive.Concurrency.VirtualTimeScheduler<TAbsolute, TRelative>](VirtualTimeScheduler\VirtualTimeScheduler(TAbsolute,.md)

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

Syntax

'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.

Type Parameters

  • TAbsolute
    The absolute time argument type.

  • TRelative
    The relative time argument type.

The VirtualTimeSchedulerBase<TAbsolute, TRelative> type exposes the following members.

Constructors

NameDescriptionProtected method[VirtualTimeSchedulerBase<TAbsolute, TRelative>()](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)Creates a new virtual time scheduler with the default value of TAbsolute for the initial clock value.Protected methodVirtualTimeSchedulerBase<TAbsolute, TRelative>(TAbsolute, IComparer)Creates a new virtual time scheduler.Top

Properties

NameDescriptionPublic property[Clock](Clock\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the scheduler's absolute time clock value.Protected property[Comparer](Comparer\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the comparer used to compare absolute time values.Public property[IsEnabled](IsEnabled\VirtualTimeSchedulerBase(TAbsolute,.md)Gets whether the scheduler is enabled to run work.Public property[Now](Now\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the scheduler's notion of current time.Top

Methods

NameDescriptionProtected methodAddAdds a relative time to an absolute time value.Public methodAdvanceByAdvances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.Public methodAdvanceToAdvances the scheduler's clock to the specified time, running all work till that point.Public methodEquals(Inherited from Object.)Protected methodFinalize(Inherited from Object.)Public methodGetHashCode(Inherited from Object.)Protected method[GetNext](GetNext\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the next scheduled item to be executed.Public methodGetType(Inherited from Object.)Protected methodMemberwiseClone(Inherited from Object.)Public methodSchedule(TState, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed.Public methodSchedule(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed at dueTime.Public methodSchedule(TState, TimeSpan, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed after dueTime.Public methodScheduleAbsoluteSchedules an action to be executed at dueTime.Public methodScheduleRelativeSchedules an action to be executed at dueTime.Public method[Start](Start\VirtualTimeSchedulerBase(TAbsolute,.md)Starts the virtual time scheduler.Public method[Stop](Stop\VirtualTimeSchedulerBase(TAbsolute,.md)Stops the virtual time scheduler.Protected methodToDateTimeOffsetConverts the absolute time value to a DateTimeOffset value.Protected methodToRelativeConverts the TimeSpan value to a relative time value.Public methodToString(Inherited from Object.)Top

Extension Methods

NameDescriptionPublic Extension MethodSchedule(Action)Overloaded. Schedules an action to be executed. (Defined by Scheduler.)Public Extension MethodSchedule(Action)Overloaded. Schedules an action to be executed recursively. (Defined by Scheduler.)Public Extension MethodSchedule(TimeSpan, Action)Overloaded. Schedules an action to be executed after dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(DateTimeOffset, Action)Overloaded. Schedules an action to be executed at dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TimeSpan, Action<Action>)Overloaded. Schedules an action to be executed recursively after each dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(DateTimeOffset, Action<Action>)Overloaded. Schedules an action to be executed after dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TState, Action<TState, Action>)Overloaded. Schedules an action to be executed recursively. (Defined by Scheduler.)Public Extension MethodSchedule(TState, TimeSpan, Action<TState, Action<TState, TimeSpan>>)Overloaded. Schedules an action to be executed recursively after each dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TState, DateTimeOffset, Action<TState, Action<TState, DateTimeOffset>>)Overloaded. Schedules an action to be executed recursively at each dueTime. (Defined by Scheduler.)Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive.Concurrency Namespace

VirtualTimeSchedulerBase<TAbsolute, TRelative> Properties

Include Protected Members
Include Inherited Members

The [VirtualTimeSchedulerBase<TAbsolute, TRelative>](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md) type exposes the following members.

Properties

NameDescriptionPublic property[Clock](Clock\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the scheduler's absolute time clock value.Protected property[Comparer](Comparer\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the comparer used to compare absolute time values.Public property[IsEnabled](IsEnabled\VirtualTimeSchedulerBase(TAbsolute,.md)Gets whether the scheduler is enabled to run work.Public property[Now](Now\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the scheduler's notion of current time.Top

See Also

Reference

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Class](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

System.Reactive.Concurrency Namespace

VirtualTimeSchedulerBase<TAbsolute, TRelative> Constructor

Include Protected Members
Include Inherited Members

Initializes a new instance of the [VirtualTimeSchedulerBase<TAbsolute, TRelative>](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md) class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

NameDescriptionProtected method[VirtualTimeSchedulerBase<TAbsolute, TRelative>()](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)Creates a new virtual time scheduler with the default value of TAbsolute for the initial clock value.Protected methodVirtualTimeSchedulerBase<TAbsolute, TRelative>(TAbsolute, IComparer)Creates a new virtual time scheduler.Top

See Also

Reference

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Class](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

System.Reactive.Concurrency Namespace

VirtualTimeSchedulerBase<TAbsolute, TRelative> Methods

Include Protected Members
Include Inherited Members

The [VirtualTimeSchedulerBase<TAbsolute, TRelative>](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md) type exposes the following members.

Methods

NameDescriptionProtected methodAddAdds a relative time to an absolute time value.Public methodAdvanceByAdvances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.Public methodAdvanceToAdvances the scheduler's clock to the specified time, running all work till that point.Public methodEquals(Inherited from Object.)Protected methodFinalize(Inherited from Object.)Public methodGetHashCode(Inherited from Object.)Protected method[GetNext](GetNext\VirtualTimeSchedulerBase(TAbsolute,.md)Gets the next scheduled item to be executed.Public methodGetType(Inherited from Object.)Protected methodMemberwiseClone(Inherited from Object.)Public methodSchedule(TState, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed.Public methodSchedule(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed at dueTime.Public methodSchedule(TState, TimeSpan, Func<IScheduler, TState, IDisposable>)Schedules an action to be executed after dueTime.Public methodScheduleAbsoluteSchedules an action to be executed at dueTime.Public methodScheduleRelativeSchedules an action to be executed at dueTime.Public method[Start](Start\VirtualTimeSchedulerBase(TAbsolute,.md)Starts the virtual time scheduler.Public method[Stop](Stop\VirtualTimeSchedulerBase(TAbsolute,.md)Stops the virtual time scheduler.Protected methodToDateTimeOffsetConverts the absolute time value to a DateTimeOffset value.Protected methodToRelativeConverts the TimeSpan value to a relative time value.Public methodToString(Inherited from Object.)Top

Extension Methods

NameDescriptionPublic Extension MethodSchedule(Action)Overloaded. Schedules an action to be executed. (Defined by Scheduler.)Public Extension MethodSchedule(Action)Overloaded. Schedules an action to be executed recursively. (Defined by Scheduler.)Public Extension MethodSchedule(TimeSpan, Action)Overloaded. Schedules an action to be executed after dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(DateTimeOffset, Action)Overloaded. Schedules an action to be executed at dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TimeSpan, Action<Action>)Overloaded. Schedules an action to be executed recursively after each dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(DateTimeOffset, Action<Action>)Overloaded. Schedules an action to be executed after dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TState, Action<TState, Action>)Overloaded. Schedules an action to be executed recursively. (Defined by Scheduler.)Public Extension MethodSchedule(TState, TimeSpan, Action<TState, Action<TState, TimeSpan>>)Overloaded. Schedules an action to be executed recursively after each dueTime. (Defined by Scheduler.)Public Extension MethodSchedule(TState, DateTimeOffset, Action<TState, Action<TState, DateTimeOffset>>)Overloaded. Schedules an action to be executed recursively at each dueTime. (Defined by Scheduler.)Top

See Also

Reference

[VirtualTimeSchedulerBase<TAbsolute, TRelative> Class](VirtualTimeSchedulerBase\VirtualTimeSchedulerBase(TAbsolute,.md)

System.Reactive.Concurrency Namespace