protected ExcelFormula GetTopParentFirstEntryFormulas(Guid uid) { ExcelFormula innerFormulasUnited = new ExcelFormula(); if (Parent != null) { return(Parent.GetTopParentFirstEntryFormulas(uid)); } else { innerFormulasUnited.AddElementsRange(GetInnerFirstEntryFormulas(uid).Elements); return(innerFormulasUnited); } }
//TODO: Похоже на проблему, дублирование функционала protected ExcelFormula GetFirstLevelFormulas(Guid uid) { ExcelFormula innerFormulasUnited = new ExcelFormula(); if (InnerBlocks != null && InnerBlocks.Count > 0) { foreach (var innerBlock in InnerBlocks) { ExcelFormula innerFormula = innerBlock.GetFormula(uid); innerFormulasUnited.AddElementsRange(innerFormula.Elements); } } return(innerFormulasUnited); }