protected virtual List<RowObject> MergeRows(RowObject rowObject, List<RowObject> list)
 {
     var newRows = new List<RowObject>();
     if (rowObject == null)
         return newRows;
     newRows.Add(rowObject);
     newRows.AddRange(list);
     return newRows;
 }
 public RowObject TransformToRowObject(CustomRowObject customRowObject)
 {
     var rowObject = new RowObject();
     rowObject.ParentRowId = customRowObject.ParentRowId;
     rowObject.RowId = customRowObject.RowId;
     rowObject.RowAction = customRowObject.RowAction == null ? null : customRowObject.RowAction.Value;
     rowObject.Fields = TransformCustomFields(customRowObject.Fields);
     return rowObject;
 }
 public CustomRowObject TransformToCustomRowObject(RowObject rowObject)
 {
     var CustomRowObject = new CustomRowObject();
     CustomRowObject.ParentRowId = rowObject.ParentRowId;
     CustomRowObject.RowAction = ConvertToRowAction(rowObject.RowAction);
     CustomRowObject.RowId = rowObject.RowId;
     CustomRowObject.RowType = GetRowType(rowObject);
     CustomRowObject.Fields = TransformFields(rowObject.Fields);
     return CustomRowObject;
 }
 protected virtual bool IsMultipleIteration(RowObject rowObject)
 {
     if (rowObject.ParentRowId != null && rowObject.ParentRowId.IndexOf(MULTIPLE_ITERATION_ROW_IDENTIFIER) > 0)
         return true;
     return false;
 }
 protected virtual RowType GetRowType(RowObject rowObject)
 {
     return IsMultipleIteration(rowObject) ? RowType.Other : RowType.Current;
 }
 private RowObject MockBasicRowObject()
 {
     var rowObject = new RowObject();
     rowObject.ParentRowId = "1";
     rowObject.RowAction = "EDIT";
     rowObject.RowId = "3";
     return rowObject;
 }
 private void ChangeParentRowId(RowObject rowObject, string ParentRowId)
 {
     rowObject.ParentRowId = ParentRowId;
 }
 private void AddFieldObjects(RowObject rowObject, int NumberOfObjects)
 {
     for (int i = 0; i < NumberOfObjects; i++)
     {
         rowObject.Fields.Add(CreateFieldObject());
     }
 }
 protected virtual CustomRowObject TransformRow(RowObject row)
 {
     return new RowObjectTransform().TransformToCustomRowObject(row);
 }