示例#1
0
 private void AddArrayMembers <T>(T target, CsvParser <T> csvParser)
 {
     for (int i = 0; i < arrayMembers.Count; i++)
     {
         Member m = arrayMembers[i];
         m.SetValue(target, csvParser.GetParsedArrayValue(members[i].GetMemberType(), csvParser.CurrentLine(), arrayCols[i]));
     }
 }
 private object[] GetParsedValues <T>(CsvParser <T> csvParser)
 {
     object[] parameters = new object[csvCols.Count + arrayCols.Count];
     for (int i = 0; i < csvCols.Count; i++)
     {
         int col = csvCols[i];
         parameters[i] = csvParser.GetParsedValue(Parameters[i].ParameterType, csvParser.CurrentLine().ElementAt(col));
     }
     for (int j = 0; j < arrayCols.Count; j++)
     {
         parameters[csvCols.Count + j] = csvParser.GetParsedArrayValue(Parameters[csvCols.Count + j].ParameterType, csvParser.CurrentLine(), arrayCols[j]);
     }
     return(parameters);
 }