예제 #1
0
 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);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public Example(ExampleColumns columnNames, Dictionary <string, string> columnValues)
 {
     ColumnNames  = columnNames;
     ColumnValues = new ColumnValues(columnValues);
 }