Click or drag to resize

IDfsDataConverter Interface

Interface for converting static and dynamic items and their data.

Namespace:  DHI.Generic.MikeZero.DFS
Assembly:  DHI.Generic.MIKEZero.DFS (in DHI.Generic.MIKEZero.DFS.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public interface IDfsDataConverter

The IDfsDataConverter type exposes the following members.

Methods
  NameDescription
Public methodConvert(IDfsDynamicItemInfo)
Convert the dynamic item information, IDfsDynamicItemInfo.

In case no conversion is required, just return the input itemInfo

In case conversion is required for item, return a new IDfsDynamicItemInfo wrapping the input argument as requried. See DfsDynamicItemDecoratorBase for an example of how to make a new dynamic item by wrapping an existing.

Public methodConvert(IDfsItemData)
Convert the dynamic item data, IDfsItemData

In case no conversion is required, just return the input itemData

In case conversion is required, return a new IDfsItemData wrapping the input argument as requried. You can use CreateTT(IDfsItemData, TT) to quickly make a new IDfsItemData based on the input argument.

Public methodConvert(IDfsStaticItem)
Convert a static item, including its data.

In case no conversion is required, just return the input staticItem

In case conversion is required, return a new IDfsStaticItem wrapping the input argument as required. See DfsStaticItemDecoratorBase for an example of how to make a new static item by wrapping an existing.

Public methodInitialize
Initialise this data converter for working on the given dfsFile
Public methodRevert(Int32, Array)
Revert the dynamic item data.

This must be the opposite of what Convert(IDfsItemData) does. In case the convert method does nothing, this should do nothing as well.

In case no conversion is required, just return the input data. Otherwise return a new reverted data array.

Public methodRevert(IDfsStaticItem, Array)
Revert the static item data.

This must be the opposite of what Convert(IDfsStaticItem) does. In case the convert method does nothing, this should do nothing as well.

In case no conversion is required, just leave the method body empty.

In case conversion is required, return the original IDfsStaticItem and the reverted array data as the two arguments.

Top
See Also