Class UniqueColumnGeneratorDataTableMod
Namespace: Workspace.XBR.Xperiflow.Utilities.AdoDataTable.Builder
Assembly: Xperiflow.dll
public class UniqueColumnGeneratorDataTableMod : IDataTableModifier
Implements: Workspace.XBR.Xperiflow.Utilities.AdoDataTable.Builder.IDataTableModifier
Methods
RowApply(SessionInfo, ref DataRow, Dictionary<string, int>)
Alter the DataRow in place with the business logic required to Modify the DataTable.
public void RowApply(SessionInfo si, ref DataRow dr, Dictionary<string, int> columnIndexMap)
Parameters
Type | Name | Description |
---|---|---|
OneStream.Shared.Common.SessionInfo | si | |
System.Data.DataRow | dr | |
System.Collections.Generic.Dictionary<System.String,System.Int32> | columnIndexMap | A 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. |
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.
public void StageColumnAccess(SessionInfo si, Dictionary<string, int> columnIndexMap)
Parameters
Type | Name | Description |
---|---|---|
OneStream.Shared.Common.SessionInfo | si | |
System.Collections.Generic.Dictionary<System.String,System.Int32> | columnIndexMap | A dictionary of column-column ordinal index pairs that represents the column ordering of the DataTable to modify before global modification. |
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.
public List<DataColumn> CreateColumns(SessionInfo si, List<string> originalColumns, DataColumnCollection currentColumns)
Returns
System.Collections.Generic.List<System.Data.DataColumn>
Parameters
Type | Name | Description |
---|---|---|
OneStream.Shared.Common.SessionInfo | si | |
System.Collections.Generic.List<System.String> | originalColumns | The original columns found in the DataTable to modify. |
System.Data.DataColumnCollection | currentColumns | The 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. |
MapAdditionalRows(SessionInfo, ref DataRow, ref DataTable, Dictionary<string, int>)
Insert additional DataRows with business logic based on original values in DataRows.
public void MapAdditionalRows(SessionInfo si, ref DataRow dr, ref DataTable dt, Dictionary<string, int> columnIndexMap)
Parameters
Type | Name | Description |
---|---|---|
OneStream.Shared.Common.SessionInfo | si | |
System.Data.DataRow | dr | |
System.Data.DataTable | dt | |
System.Collections.Generic.Dictionary<System.String,System.Int32> | columnIndexMap | A 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. |
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object,System.Object)
System.Object.GetHashCode
System.Object.GetType
System.Object.MemberwiseClone
System.Object.ReferenceEquals(System.Object,System.Object)
System.Object.ToString