Skip to content
Documentation

TimeSeriesDataCollectionExtensions Class

Class for extending the ITimeSeriesDataCollection<TValue> functionality.

public static class TimeSeriesDataCollectionExtensions

Inheritance System.Object 🡒 TimeSeriesDataCollectionExtensions

TimeSeriesDataCollectionExtensions.Memoized<TValue>(this ITimeSeriesDataCollection<TValue>) Method

Section titled “TimeSeriesDataCollectionExtensions.Memoized<TValue>(this ITimeSeriesDataCollection<TValue>) Method”

Memoizes an ITimeSeriesDataCollection<TValue> to cache the ITimeSeriesData<TValue> and be able to reuse the data while avoiding multiple calls to the Storage to reread the ITimeSeriesData<TValue>.

public static HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> Memoized<TValue>(this HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> timeSeriesDataCollection)
where TValue : System.IEquatable<TValue>, System.IComparable<TValue>;

TValue

The type of the data for ITimeSeriesData<TValue>.

timeSeriesDataCollection HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>

The ITimeSeriesDataCollection<TValue> to memoize.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>
A memoized ITimeSeriesDataCollection<TValue> where the underlying ITimeSeriesData<TValue> can be used multiple times without rereading it from the Storage.

The cache is kept once an enumeration has run to completion. If every enumerator is disposed while the underlying read is still in progress, the partial cache and the underlying storage read are released — so an abandoned enumeration does not hold on to a database connection — and the next enumeration rereads the data from the Storage.

An error of the underlying read is replayed to every enumerator, including the ones created afterwards, instead of ending the series. Advancing an enumerator which has already been disposed throws an System.ObjectDisposedException.

The returned collection is not thread safe: enumerate it from one reader at a time, as concurrent enumerators corrupt the cache and can release the underlying read while another enumerator is still using it.

© 2026 Volue.Version v0.6.38017 November 2026