IEnumerable <PanelItem> GetPanelItems(IEnumerable <IPanelItemDTO> dtos, LocalConceptMap concepts) { var items = new List <PanelItem>(); foreach (var itemdto in dtos) { var item = itemdto.PanelItem(concepts[itemdto.Resource.Id.Value]); items.Add(item); } return(items); }
IEnumerable <Panel> GetPanels(IEnumerable <IPanelDTO> panels, LocalConceptMap concepts) { var converted = new List <Panel>(); foreach (var paneldto in panels) { var subs = GetSubPanels(paneldto.SubPanels, concepts); converted.Add(paneldto.Panel(subs)); } return(converted); }
ICollection <SubPanel> GetSubPanels(IEnumerable <ISubPanelDTO> dtos, LocalConceptMap concepts) { var subs = new List <SubPanel>(); foreach (var subdto in dtos) { var items = GetPanelItems(subdto.PanelItems, concepts); var sub = subdto.SubPanel(items); subs.Add(sub); } return(subs); }