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, TaskFactory)

Creates a new IntervalEventSource instance.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

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

Interval(ITimestampProvider, Duration, TaskFactory, Duration)

Creates a new IntervalEventSource instance.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

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, TaskFactory, Duration, long)

Creates a new IntervalEventSource instance.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

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, TaskFactory, long)

Creates a new IntervalEventSource instance.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

interval Duration

Interval between subsequent timer events.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

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, TaskFactory)

Creates a new IntervalEventSource instance with a single emitted event.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

Returns

IntervalEventSource

New IntervalEventSource instance.

Exceptions

ArgumentOutOfRangeException

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

Timeout(ITimestampProvider, Duration, TaskFactory, Duration)

Creates a new IntervalEventSource instance with a single emitted event.

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

Parameters

timestampProvider ITimestampProvider

Timestamp provider used for time tracking.

timeout Duration

Delay before timer event is emitted.

taskFactory TaskFactory

Task factory used for creating and underlying timer task.

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.