Skip to main content

Interface IDataTableModifier

Namespace: Workspace.XBR.Xperiflow.Utilities.AdoDataTable.Builder

Assembly: Xperiflow.dll

Declaration
public interface IDataTableModifier

Methods

CreateColumns(SessionInfo, List<string>, DataColumnCollection)

Build a list of the expected column names that are being generated by this modifier. Make sure they are unique as they will be validated for uniqueness across all other modifiers generated columns.

Declaration
List<DataColumn> CreateColumns(SessionInfo si, List<string> originalColumns, DataColumnCollection currentColumns)
Returns

System.Collections.Generic.List<System.Data.DataColumn>

Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosi
System.Collections.Generic.List<System.String>originalColumnsThe original columns found in the DataTable to modify.
System.Data.DataColumnCollectioncurrentColumnsThe current columns found in the DataTable to modify. This implies that the order in which IDataTableModifier are added to the DataTableBuilder control the what is in the current columns at call time of this function.

StageColumnAccess(SessionInfo, Dictionary<string, int>)

This can be optionally implemented although it is recommended to implement. This give the opportunity for the concrete DataTableModifier to save column indices that can then be used in the RowApply function. This is mainly used for optimal column access when interacting with a DataRow.

Declaration
void StageColumnAccess(SessionInfo si, Dictionary<string, int> columnIndexMap)
Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosi
System.Collections.Generic.Dictionary<System.String,System.Int32>columnIndexMapA dictionary of column-column ordinal index pairs that represents the column ordering of the DataTable to modify before global modification.

RowApply(SessionInfo, ref DataRow, Dictionary<string, int>)

Alter the DataRow in place with the business logic required to Modify the DataTable.

Declaration
void RowApply(SessionInfo si, ref DataRow dr, Dictionary<string, int> columnIndexMap)
Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosi
System.Data.DataRowdr
System.Collections.Generic.Dictionary<System.String,System.Int32>columnIndexMapA dictionary of column-column ordinal index pairs that represents the column ordering of the DataTable to modify. This may be optionally used if the StageColumnAccess was not implemented.

MapAdditionalRows(SessionInfo, ref DataRow, ref DataTable, Dictionary<string, int>)

Insert additional DataRows with business logic based on original values in DataRows.

Declaration
void MapAdditionalRows(SessionInfo si, ref DataRow dr, ref DataTable dt, Dictionary<string, int> columnIndexMap)
Parameters
TypeNameDescription
OneStream.Shared.Common.SessionInfosi
System.Data.DataRowdr
System.Data.DataTabledt
System.Collections.Generic.Dictionary<System.String,System.Int32>columnIndexMapA dictionary of column-column ordinal index pairs that represents the column ordering of the DataTable to modify. This may be optionally used if the StageColumnAccess was not implemented.

Was this page helpful?