Click or drag to resize

ITsDataConverter Interface

An ITsDataConverter can be registered at an ITsBridge. It converts the Data either to another type (ex. float to double), or it can convert the actual numbers (ex. user unit to SI unit).

The Converter should be applied to all data loaded by the bridge.

The Reverter should be applied to all data stored by the bridge.

ConvertItem(TsItem) should be called for an item before any of the Convert(TsItem, Array) or Revert(TsItem, Array) calls, in order to let the converter do any required initialization.

Namespace:  DHI.Mike1D.Generic.TimeSeries
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public interface ITsDataConverter

The ITsDataConverter type exposes the following members.

Methods
  NameDescription
Public methodConvert

Takes as input an array/ilist of values of some type and returns another array/ilist of some type.

If the input object does not match the converter, it should return the array again.

The input array may be modified in-place

Public methodCode exampleConvertItem

Takes in one item and returns an item that matches the data conversion.

Public methodRevert

Takes as input an array/ilist of values of some type and returns another array/ilist of some type. Should produce the inverse of the Convert(TsItem, Array) call

If the input object does not match the converter, it should return the array again.

The input array may be modified in-place

Top
See Also