private void CloneTableSteps(StringTableStep clone) { foreach (var tableStep in TableSteps) { var clonedValues = tableStep.ColumnValues.ToDictionary(pair => pair.Key, pair => pair.Value); var clonedNames = new ExampleColumns(tableStep.ColumnNames); var clonedRow = new Example(clonedNames, clonedValues); clone.AddTableStep(clonedRow); } }
private static ExampleColumns BuildColumnNames(string[] cols) { var theMiddle = cols.Length / 2; var columnNames = new ExampleColumns(); for (int i = 0; i < theMiddle; i++) { columnNames.Add(new ExampleColumn(cols[i].Trim())); } return(columnNames); }
private static Dictionary <string, string> BuildColumnValues(ExampleColumns columnNames, string[] cols) { var theMiddle = cols.Length / 2; var columnValues = new Dictionary <string, string>(); for (int i = 0; i < theMiddle; i++) { string value = cols[1 + i + theMiddle].Trim(); columnValues.Add(columnNames[i].Name, value); } return(columnValues); }
public Example(ExampleColumns columnNames, Dictionary <string, string> columnValues) { ColumnNames = columnNames; ColumnValues = new ColumnValues(columnValues); }