public List<Object> GenerateHelperItemList(List<object> itemList) { var parentWrapperList = new List<Object>(); foreach (var item in itemList) { if (item is IParentObject) { var parentWrapper = new ParentWrapper(item, _currentId); _currentId++; parentWrapperList.Add(parentWrapper); } else { parentWrapperList.Add(item); } } return parentWrapperList; }
public List <Object> GenerateHelperItemList(List <object> itemList) { var parentWrapperList = new List <Object>(); foreach (var item in itemList) { if (item is IParentObject) { var parentWrapper = new ParentWrapper(item, _currentId); _currentId++; parentWrapperList.Add(parentWrapper); } else { parentWrapperList.Add(item); } } return(parentWrapperList); }