コード例 #1
0
 public SheetRowModelFactory(
     SheetHeaderModelFactory sheetHeaderModelFactory,
     SheetCellModelFactory sheetCellModelFactory)
 {
     SheetHeaderModelFactory = sheetHeaderModelFactory;
     SheetCellModelFactory   = sheetCellModelFactory;
 }
コード例 #2
0
        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);
        }