Skip to content
Documentation

IDataTransformer<TValue> Interface

Transforms time series data.

public interface IDataTransformer<TValue> : HAKOM.TSM.Net.Api.Data.TimeSeries.IDataTransformer
where TValue : System.IComparable<TValue>, System.IEquatable<TValue>

TValue

Implements IDataTransformer

IDataTransformer<TValue>.IntervalTransformationOptions Property

Section titled “IDataTransformer<TValue>.IntervalTransformationOptions Property”

Used to create IIntervalTransformationOptions.

HAKOM.TSM.Net.Api.Data.TimeSeries.IIntervalTransformationOptionsFactory IntervalTransformationOptions { get; }

IIntervalTransformationOptionsFactory

IDataTransformer<TValue>.FromSpan(ITimeSeriesDataSpan<TValue>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method

Section titled “IDataTransformer<TValue>.FromSpan(ITimeSeriesDataSpan<TValue>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method”

Converts ITimeSeriesDataSpan<TValue> to a ITimeSeriesDataCollection<TValue>.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> FromSpan(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue> timeSeriesDataSpan, HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference? unitReference, HAKOM.TSM.Net.Api.Time.Intervals.IInterval interval, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType functionType, HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone timeZone, System.Nullable<System.DateTimeOffset> startOfTime, System.Nullable<HAKOM.TSM.Net.Api.Time.Intervals.IntervalTransformationMethod> intervalTransformationMethod=null, HAKOM.TSM.Net.Api.TimeSeries.Persistence.References.ITimeSeriesReference? timeSeriesReference=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

timeSeriesDataSpan HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>

The ITimeSeriesDataSpan<TValue> to convert.

unitReference IUnitReference

The IUnitReference to the unit in which the data is provided.

interval IInterval

The IInterval in which the ITimeSeriesDataCollection<TValue> should be created.

cyclic System.Boolean

The cyclic setting if the target ITimeSeriesDataCollection<TValue> should be cyclic or not.

functionType FunctionType

The FunctionType of the target ITimeSeriesDataCollection<TValue>.

timeZone ITimeZone

The ITimeZone of the target ITimeSeriesDataCollection<TValue>.

startOfTime System.Nullable<System.DateTimeOffset>

The start time of the time series data mesh. If the parameter is *not* provided the default start of time from ITimeSeriesDefaults will be used.

intervalTransformationMethod System.Nullable<IntervalTransformationMethod>

Specifies the method used to aggregate or transform values when converting from span-based data to stamp-based data, particularly when the intervals of the input data do not match the target intervals of the resulting time series data.

timeSeriesReference ITimeSeriesReference

Specifies the ITimeSeriesReference to use for retrieving default values for unitReference and intervalTransformationMethod.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>
The converted ITimeSeriesDataCollection<TValue>.

If the input spans overlap multiple target intervals, the IntervalTransformationMethod determines how values are combined. For example, use Sum() to sum values, Average() to average them, depending on the desired aggregation rule. If unitReference or intervalTransformationMethod are not explicitly provided, the implementation will attempt to resolve their values from the timeSeriesReference. This allows for consistent and context-aware data transformation based on the configuration of the specified time series.

IDataTransformer<TValue>.FromSpan(IAsyncEnumerable<ITimeSeriesDataSpan<TValue>>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method

Section titled “IDataTransformer<TValue>.FromSpan(IAsyncEnumerable<ITimeSeriesDataSpan<TValue>>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method”

Converts an System.Collections.Generic.IAsyncEnumerable<> of ITimeSeriesDataSpan<TValue> to a ITimeSeriesDataCollection<TValue>.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> FromSpan(System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>> timeSeriesDataSpan, HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference? unitReference, HAKOM.TSM.Net.Api.Time.Intervals.IInterval interval, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType functionType, HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone timeZone, System.Nullable<System.DateTimeOffset> startOfTime, System.Nullable<HAKOM.TSM.Net.Api.Time.Intervals.IntervalTransformationMethod> intervalTransformationMethod=null, HAKOM.TSM.Net.Api.TimeSeries.Persistence.References.ITimeSeriesReference? timeSeriesReference=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

timeSeriesDataSpan System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>>

An System.Collections.Generic.IAsyncEnumerable<> of ITimeSeriesDataSpan<TValue> to convert.

unitReference IUnitReference

The IUnitReference to the unit in which the data is provided.

interval IInterval

The IInterval in which the ITimeSeriesDataCollection<TValue> should be created.

cyclic System.Boolean

The cyclic setting if the target ITimeSeriesDataCollection<TValue> should be cyclic or not.

functionType FunctionType

The FunctionType of the target ITimeSeriesDataCollection<TValue>.

timeZone ITimeZone

The ITimeZone of the target ITimeSeriesDataCollection<TValue>.

startOfTime System.Nullable<System.DateTimeOffset>

The start time of the time series data mesh. If the parameter is *not* provided the default start of time from ITimeSeriesDefaults will be used.

intervalTransformationMethod System.Nullable<IntervalTransformationMethod>

Specifies the method used to aggregate or transform values when converting from span-based data to stamp-based data, particularly when the intervals of the input data do not match the target intervals of the resulting time series data.

timeSeriesReference ITimeSeriesReference

Specifies the ITimeSeriesReference to use for retrieving default values for unitReference and intervalTransformationMethod.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>
The converted ITimeSeriesDataCollection<TValue>.

If the input spans overlap multiple target intervals, the IntervalTransformationMethod determines how values are combined. For example, use Sum() to sum values, Average() to average them, depending on the desired aggregation rule. If unitReference or intervalTransformationMethod are not explicitly provided, the implementation will attempt to resolve their values from the timeSeriesReference. This allows for consistent and context-aware data transformation based on the configuration of the specified time series.

IDataTransformer<TValue>.FromSpan(IEnumerable<ITimeSeriesDataSpan<TValue>>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method

Section titled “IDataTransformer<TValue>.FromSpan(IEnumerable<ITimeSeriesDataSpan<TValue>>, IUnitReference, IInterval, bool, FunctionType, ITimeZone, Nullable<DateTimeOffset>, Nullable<IntervalTransformationMethod>, ITimeSeriesReference, CancellationToken) Method”

Converts an System.Collections.Generic.IEnumerable<> of ITimeSeriesDataSpan<TValue> to a ITimeSeriesDataCollection<TValue>.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> FromSpan(System.Collections.Generic.IEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>> timeSeriesDataSpan, HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference? unitReference, HAKOM.TSM.Net.Api.Time.Intervals.IInterval interval, bool cyclic, HAKOM.TSM.Net.Api.TimeSeries.FunctionType functionType, HAKOM.TSM.Net.Api.Time.TimeZones.ITimeZone timeZone, System.Nullable<System.DateTimeOffset> startOfTime, System.Nullable<HAKOM.TSM.Net.Api.Time.Intervals.IntervalTransformationMethod> intervalTransformationMethod=null, HAKOM.TSM.Net.Api.TimeSeries.Persistence.References.ITimeSeriesReference? timeSeriesReference=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

timeSeriesDataSpan System.Collections.Generic.IEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>>

An System.Collections.Generic.IEnumerable<> of ITimeSeriesDataSpan<TValue> to convert.

unitReference IUnitReference

The IUnitReference to the unit in which the data is provided.

interval IInterval

The IInterval in which the ITimeSeriesDataCollection<TValue> should be created.

cyclic System.Boolean

The cyclic setting if the target ITimeSeriesDataCollection<TValue> should be cyclic or not.

functionType FunctionType

The FunctionType of the target ITimeSeriesDataCollection<TValue>.

timeZone ITimeZone

The ITimeZone of the target ITimeSeriesDataCollection<TValue>.

startOfTime System.Nullable<System.DateTimeOffset>

The start time of the time series data mesh. If the parameter is *not* provided the default start of time from ITimeSeriesDefaults will be used.

intervalTransformationMethod System.Nullable<IntervalTransformationMethod>

Specifies the method used to aggregate or transform values when converting from span-based data to stamp-based data, particularly when the intervals of the input data do not match the target intervals of the resulting time series data.

timeSeriesReference ITimeSeriesReference

Specifies the ITimeSeriesReference to use for retrieving default values for unitReference and intervalTransformationMethod.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>
The converted ITimeSeriesDataCollection<TValue>.

If the input spans overlap multiple target intervals, the IntervalTransformationMethod determines how values are combined. For example, use Sum() to sum values, Average() to average them, depending on the desired aggregation rule. If unitReference or intervalTransformationMethod are not explicitly provided, the implementation will attempt to resolve their values from the timeSeriesReference. This allows for consistent and context-aware data transformation based on the configuration of the specified time series.

IDataTransformer<TValue>.ToSpan(ITimeSeriesDataCollection<TValue>, CancellationToken) Method

Section titled “IDataTransformer<TValue>.ToSpan(ITimeSeriesDataCollection<TValue>, CancellationToken) Method”

Converts a ITimeSeriesDataCollection<TValue> into a collection of ITimeSeriesDataSpan<TValue>.

System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>> ToSpan(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> timeSeriesDataCollection, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

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

The ITimeSeriesDataCollection<TValue> containing the data, which will be transformed.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataSpan<TValue>>
The data as collection of ITimeSeriesDataSpan<TValue>.

Note that some implementations may require that the collection meet certain requirements. The default implementation, for example, requires that, when converting a non-cyclic ITimeSeriesDataCollection<TValue>, the last element in the collection has to be set with a Ignore() flag.

IDataTransformer<TValue>.TransformFormat(ITimeSeriesDataCollection<TValue>, Nullable<FunctionType>, Nullable<bool>, Nullable<DateTimeOffset>, CancellationToken) Method

Section titled “IDataTransformer<TValue>.TransformFormat(ITimeSeriesDataCollection<TValue>, Nullable<FunctionType>, Nullable<bool>, Nullable<DateTimeOffset>, CancellationToken) Method”

Transforms the format of the given data to the given function type and cyclic configuration.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> TransformFormat(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> data, System.Nullable<HAKOM.TSM.Net.Api.TimeSeries.FunctionType> function, System.Nullable<bool> cyclic, System.Nullable<System.DateTimeOffset> toDate=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

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

The ITimeSeriesDataCollection<TValue> containing the data, which will be transformed.

function System.Nullable<FunctionType>

The FunctionType used for the transformation. If null is given, no argument is passed or if the target function type is the same as that of the source data, the function type will not be altered.

cyclic System.Nullable<System.Boolean>

The System.Boolean configuration for the cyclic nature of the data points. If null is given, no argument is passed, or if the target configuration is the same as that of the source data, the cyclic attribute will not be altered.

toDate System.Nullable<System.DateTimeOffset>

Limits the data for the transformation from non-cyclic to cyclic configuration, if the flag of the last element of the non-cyclic data is not Ignore(). This parameter is ignored if null or no argument is passed to parameter cyclic.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

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

IDataTransformer<TValue>.TransformInterval(ITimeSeriesDataCollection<TValue>, IIntervalTransformationOptions, CancellationToken) Method

Section titled “IDataTransformer<TValue>.TransformInterval(ITimeSeriesDataCollection<TValue>, IIntervalTransformationOptions, CancellationToken) Method”

Transforms the given data based on the given intervalTransformationOptions.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> TransformInterval(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> data, HAKOM.TSM.Net.Api.Data.TimeSeries.IIntervalTransformationOptions intervalTransformationOptions, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

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

The ITimeSeriesDataCollection<TValue> containing the data, which will be transformed.

intervalTransformationOptions IIntervalTransformationOptions

The IIntervalTransformationOptions used for the transformation.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue>
The given data collection in the new interval.

IDataTransformer<TValue>.TransformToTotal(ITimeSeriesDataCollection<TValue>, Period, Nullable<IntervalTransformationMethod>, IUnitReference, ITimeSeriesReference, CancellationToken) Method

Section titled “IDataTransformer<TValue>.TransformToTotal(ITimeSeriesDataCollection<TValue>, Period, Nullable<IntervalTransformationMethod>, IUnitReference, ITimeSeriesReference, CancellationToken) Method”

Transforms the given data to its total based on the given transformationMethod.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>> TransformToTotal(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesDataCollection<TValue> data, HAKOM.TSM.Net.Api.Time.Periods.Period period, System.Nullable<HAKOM.TSM.Net.Api.Time.Intervals.IntervalTransformationMethod> transformationMethod, HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference? unitReference=null, HAKOM.TSM.Net.Api.TimeSeries.Persistence.References.ITimeSeriesReference? timeSeriesReference=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

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

The ITimeSeriesDataCollection<TValue> containing the data, which will be transformed.

period Period

The period used for the transformation.

transformationMethod System.Nullable<IntervalTransformationMethod>

The IntervalTransformationMethod used for the transformation.

unitReference IUnitReference

The IUnitReference used to determine the transformation method if none is explicitly provided.

timeSeriesReference ITimeSeriesReference

The ITimeSeriesReference used to determine the transformation method if neither transformationMethod nor unitReference is provided.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to abort the procedure.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>>
The total of the given data collection.

© 2026 Volue.Version v0.6.38017 November 2026