public SheetRowModelFactory( SheetHeaderModelFactory sheetHeaderModelFactory, SheetCellModelFactory sheetCellModelFactory) { SheetHeaderModelFactory = sheetHeaderModelFactory; SheetCellModelFactory = sheetCellModelFactory; }
public IList <SheetRowModel> Create(IList <IList <string> > values) { var models = new List <SheetRowModel>(); var headers = SheetHeaderModelFactory.Create(values[0]); for (var i = 1; i < values.Count; i++) { var cells = SheetCellModelFactory.Create(values[i], headers, i + 1); var model = Create(cells); models.Add(model); } return(models); }