public ExcelWorksheet(IExcelDocument excelDocument, WorksheetPart worksheetPart, IExcelDocumentStyle documentStyle, IExcelSharedStrings excelSharedStrings, ILog logger) { worksheet = worksheetPart.Worksheet; ExcelDocument = excelDocument; this.documentStyle = documentStyle; this.excelSharedStrings = excelSharedStrings; this.logger = logger; rowsCache = new TreeDictionary <uint, Row>(); var sheetData = worksheet.GetFirstChild <SheetData>(); if (sheetData != null) { rowsCache.AddAll(sheetData.Elements <Row>().Select(x => new C5.KeyValuePair <uint, Row>(x.RowIndex, x))); } }
// private static int AddStack(IEnumerable<int> arg) { // var dict1 = dict; // // foreach (var i in arg) { // dict1 = dict1.AddStack(i, i); // } // // return dict1.Count; // } private static int AddDirect(IEnumerable <int> arg) { return(dict.AddAll(arg.Zip(arg)).Count); }