Table of Contents

Class TimeSeriesRunner<TResult>

Namespace
MVVrus.AspNetCore.ActiveSession.StdRunner
Assembly
MVVrus.AspNetCore.ActiveSession.dll

Used for implementation of a sequence-oriented runner that returns a time series - a sequence of pairs of a measurement time and a measured value (of type TResult) at this time.

public class TimeSeriesRunner<TResult> : AsyncEnumAdapterRunner<(DateTime, TResult)>, IDisposable, IRunner<IEnumerable<(DateTime, TResult)>>, IRunner, IAsyncDisposable

Type Parameters

TResult

Type of the measured values in the series. They are returned as "measured value" parts of pairs ("time of measurement", "measured value") composing the result sequence of the runner. .

Inheritance
TimeSeriesRunner<TResult>
Implements
Inherited Members
Extension Methods

Remarks

This class implements the IRunner<IEnumerable<(DateTime,TResult)>> interface.

The measurements are performed by invoking the specified delegate at the specified points of time.

The measurement process begins from the the first GetRequiredAsync call, or, may be, the runner creation. Measurements are separated by specified intervals. For details see parameters of the class constructors.

The process of measurement tries to avoid accumulation of inaccuracies in determining measurement moments and in a duration of the whole process of obtaining the series by adjusting the intervals between measurements to compensate delays due to measurement delegate calls.

Constructors

TimeSeriesRunner(TimeSeriesParams<TResult>, RunnerId, IOptionsSnapshot<ActiveSessionOptions>, ILogger<TimeSeriesRunner<TResult>>?)

A constructor that creates TimeSeriesRunner instance. This constructor is used to create an instance via TypeRunnerFactory.

TimeSeriesRunner(Func<TResult>, TimeSpan, int?, CancellationTokenSource?, bool, int?, int?, bool, RunnerId, IOptionsSnapshot<ActiveSessionOptions>, ILogger?)

A constructor that creates TimeSeriesRunner instance. This constructor has protected access level and is intended for use in other constructors of this and descendent classes.

TimeSeriesRunner((Func<TResult>, TimeSpan, int), RunnerId, IOptionsSnapshot<ActiveSessionOptions>, ILogger<TimeSeriesRunner<TResult>>?)
A constructor that creates TimeSeriesRunner instance. This constructor is used to create an instance via TypeRunnerFactory. Creates a runner producing a finite series of measurements.
TimeSeriesRunner((Func<TResult>, TimeSpan), RunnerId, IOptionsSnapshot<ActiveSessionOptions>, ILogger<TimeSeriesRunner<TResult>>?)
A constructor that creates TimeSeriesRunner instance. This constructor is used to create an instance via TypeRunnerFactory. Creates a runner producing an unlimited series of measurements.