Table of Contents

Class ChronoEventSource

Namespace
LfrlAnvil.Reactive.Chrono
Assembly
LfrlAnvil.Reactive.Chrono.dll

Creates instances of IntervalEventSource type.

public static class ChronoEventSource
Inheritance
ChronoEventSource
Inherited Members

Methods

Interval(ITimestampProvider, Duration)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When interval is less than 1 tick or greater than MaxValue milliseconds

Interval(ITimestampProvider, Duration, Duration)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, Duration spinWaitDurationHint)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When interval is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.

Interval(ITimestampProvider, Duration, Duration, long)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, Duration spinWaitDurationHint, long count)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

count long

Number of events underlying timers will emit in total. Equal to MaxValue by default.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When count is less than 1 or when interval is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.

Interval(ITimestampProvider, Duration, long)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, long count)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

count long

Number of events underlying timers will emit in total. Equal to MaxValue by default.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When count is less than 1 or when interval is less than 1 tick or greater than MaxValue milliseconds.

Interval(ITimestampProvider, Duration, TaskScheduler)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

scheduler TaskScheduler

Task scheduler.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When interval is less than 1 tick or greater than MaxValue milliseconds

Interval(ITimestampProvider, Duration, TaskScheduler, Duration)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, Duration spinWaitDurationHint)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

scheduler TaskScheduler

Task scheduler.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When interval is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.

Interval(ITimestampProvider, Duration, TaskScheduler, Duration, long)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, Duration spinWaitDurationHint, long count)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

scheduler TaskScheduler

Task scheduler.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

count long

Number of events underlying timers will emit in total. Equal to MaxValue by default.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When count is less than 1 or when interval is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.

Interval(ITimestampProvider, Duration, TaskScheduler, long)

Creates a new IntervalEventSource instance.

[Pure]
public static IntervalEventSource Interval(ITimestampProvider timestampProvider, Duration interval, TaskScheduler scheduler, long count)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

scheduler TaskScheduler

Task scheduler.

count long

Number of events underlying timers will emit in total. Equal to MaxValue by default.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When count is less than 1 or when interval is less than 1 tick or greater than MaxValue milliseconds.

Timeout(ITimestampProvider, Duration)

Creates a new IntervalEventSource instance with a single emitted event.

[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When timeout is less than 1 tick or greater than MaxValue milliseconds.

Timeout(ITimestampProvider, Duration, Duration)

Creates a new IntervalEventSource instance with a single emitted event.

[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, Duration spinWaitDurationHint)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When timeout is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.

Timeout(ITimestampProvider, Duration, TaskScheduler)

Creates a new IntervalEventSource instance with a single emitted event.

[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskScheduler scheduler)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

scheduler TaskScheduler

Task scheduler.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When timeout is less than 1 tick or greater than MaxValue milliseconds.

Timeout(ITimestampProvider, Duration, TaskScheduler, Duration)

Creates a new IntervalEventSource instance with a single emitted event.

[Pure]
public static IntervalEventSource Timeout(ITimestampProvider timestampProvider, Duration timeout, TaskScheduler scheduler, Duration spinWaitDurationHint)

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

scheduler TaskScheduler

Task scheduler.

spinWaitDurationHint Duration

SpinWait duration hint for underlying timers.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

When timeout is less than 1 tick or greater than MaxValue milliseconds or when spinWaitDurationHint is less than 0.