Table of Contents

Class PrimeTestTimeBase

Namespace
KZDev.PrimeTime.Testing
Assembly
KZDev.PrimeTime.Testing.dll

NodaTime virtual instant storage, zone mapping, and Noda-specific surface for PrimeTestTimeBase.

public abstract class PrimeTestTimeBase : IPrimeTestTime, IPrimeTime
Inheritance
PrimeTestTimeBase
Implements
Derived

Properties

IsRunning

Gets a value indicating whether the test clock's automatic runner is active.

Methods

DelayAsync(Duration)

Asynchronously completes after the specified NodaTime.Duration.

DelayAsync(Duration, CancellationToken)

Asynchronously completes after the specified NodaTime.Duration, or ends early when cancellationToken is cancelled.

DelayAsync(int)

Creates a task that completes after a specified number of milliseconds.

DelayAsync(int, CancellationToken)

Creates a task that completes after a specified number of milliseconds.

DelayAsync(TimeSpan)

Creates a task that completes after a specified time interval.

DelayAsync(TimeSpan, CancellationToken)

Creates a task that completes after a specified time interval.

GetTimeCancellationToken(Duration)

Returns a disposable wrapper whose token expires after the specified NodaTime.Duration. The caller is responsible for disposing the returned instance when no longer needed.

GetTimeCancellationToken(int)

Returns a disposable wrapper whose token expires after the specified time. The caller is responsible for disposing the returned instance when no longer needed.

GetTimeCancellationToken(TimeSpan)

Returns a disposable wrapper whose token expires after the specified time. The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(Duration, CancellationToken)

Returns a disposable wrapper whose token is cancelled when either the specified duration elapses or the given cancellation token is cancelled. The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(Duration, CancellationToken, CancellationToken)

Returns a disposable wrapper whose token is cancelled when the specified duration elapses or any of the given tokens is cancelled. The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(Duration, params CancellationToken[])

Returns a disposable wrapper whose token is cancelled when the specified duration elapses or any of the given tokens is cancelled. The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(int, CancellationToken)

Returns a disposable wrapper whose token is cancelled when either the specified time elapses or the given cancellation token is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(int, CancellationToken, CancellationToken)

Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(int, params CancellationToken[])

Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(TimeSpan, CancellationToken)

Returns a disposable wrapper whose token is cancelled when either the specified time elapses or the given cancellation token is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(TimeSpan, CancellationToken, CancellationToken)

Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

LinkTimeCancellationToken(TimeSpan, params CancellationToken[])

Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.

OnSchedulingMutatedWhileGateHeld()

Called while KZDev.PrimeTime.Testing.PrimeTestTimeBase.Gate is held when pending delays, time expiries, or their lists change in a way that can affect the automatic runner's next deadline.

Sleep(Duration)

Suspends the current thread for the specified NodaTime.Duration.

Sleep(int)

Suspends the current thread for the specified number of milliseconds.

Sleep(TimeSpan)

Suspends the current thread for the specified amount of time.